| 1 | # ----------------------------------------------------------------------------- | ||||||||||
| 2 | |||||||||||
| 3 | =encoding utf8 | ||||||||||
| 4 | |||||||||||
| 5 | =head1 NAME | ||||||||||
| 6 | |||||||||||
| 7 | Quiq::Excel::Writer - Erzeuge Datei im Excel 2007+ XLSX Format | ||||||||||
| 8 | |||||||||||
| 9 | =head1 BASE CLASS | ||||||||||
| 10 | |||||||||||
| 11 | Excel::Writer::XLSX | ||||||||||
| 12 | |||||||||||
| 13 | =head1 DESCRIPTION | ||||||||||
| 14 | |||||||||||
| 15 | Diese Klasse ist abgeleitet von Excel::Writer::XLSX. | ||||||||||
| 16 | Sie erweitert die Basisklasse um | ||||||||||
| 17 | |||||||||||
| 18 | =over 2 | ||||||||||
| 19 | |||||||||||
| 20 | =item * | ||||||||||
| 21 | |||||||||||
| 22 | Tilde-Expansion im Dateinamen | ||||||||||
| 23 | |||||||||||
| 24 | =item * | ||||||||||
| 25 | |||||||||||
| 26 | Exceptions im Fehlerfall | ||||||||||
| 27 | |||||||||||
| 28 | =back | ||||||||||
| 29 | |||||||||||
| 30 | Dokumentation siehe Basisklasse. | ||||||||||
| 31 | |||||||||||
| 32 | =cut | ||||||||||
| 33 | |||||||||||
| 34 | # ----------------------------------------------------------------------------- | ||||||||||
| 35 | |||||||||||
| 36 | package Quiq::Excel::Writer; | ||||||||||
| 37 | 1 | ▶ | use base qw/Excel::Writer::XLSX/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 38 | |||||||||||
| 39 | 1 | ▶ | use v5.10; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 40 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 41 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 42 | |||||||||||
| 43 | 1 | our $VERSION = '1.240'; | |||||||||
| 44 | |||||||||||
| 45 | 1 | ▶ | use Quiq::Path; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 46 | |||||||||||
| 47 | # ----------------------------------------------------------------------------- | ||||||||||
| 48 | |||||||||||
| 49 | =head1 METHODS | ||||||||||
| 50 | |||||||||||
| 51 | =head2 Klassenmethoden | ||||||||||
| 52 | |||||||||||
| 53 | =head3 new() - Konstruktor | ||||||||||
| 54 | |||||||||||
| 55 | =head4 Synopsis | ||||||||||
| 56 | |||||||||||
| 57 | $wkb = $class->new($file); | ||||||||||
| 58 | $wkb = $class->new($fh); | ||||||||||
| 59 | |||||||||||
| 60 | =head4 Arguments | ||||||||||
| 61 | |||||||||||
| 62 | =over 4 | ||||||||||
| 63 | |||||||||||
| 64 | =item $file | ||||||||||
| 65 | |||||||||||
| 66 | Pfad der .xslx Datei, auf die geschrieben wird. | ||||||||||
| 67 | |||||||||||
| 68 | =item $fh | ||||||||||
| 69 | |||||||||||
| 70 | Filehandle, auf die geschrieben wird, z.B. \*STDOUT. | ||||||||||
| 71 | |||||||||||
| 72 | =back | ||||||||||
| 73 | |||||||||||
| 74 | =head4 Returns | ||||||||||
| 75 | |||||||||||
| 76 | Workbook-Objekt | ||||||||||
| 77 | |||||||||||
| 78 | =head4 Description | ||||||||||
| 79 | |||||||||||
| 80 | Erzeuge ein Excel Workbook-Objekt und liefere eine Referenz auf | ||||||||||
| 81 | dieses Objekt zurück. | ||||||||||
| 82 | |||||||||||
| 83 | =cut | ||||||||||
| 84 | |||||||||||
| 85 | # ----------------------------------------------------------------------------- | ||||||||||
| 86 | |||||||||||
| 87 | 1 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=3 SCAR=11.6
Pod
documented
| |||||||||||
| 88 | 1 | my ($class,$arg) = @_; | |||||||||
| 89 | |||||||||||
| 90 | 1 | ▶ | if (!ref $arg) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 91 | 1 | $arg = Quiq::Path->expandTilde($arg); | |||||||||
| 92 | } | ||||||||||
| 93 | |||||||||||
| 94 | 1 | my $wkb = $class->SUPER::new($arg); | |||||||||
| 95 | 1 | ▶ | if (!$wkb) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 96 | 0 | $class->throw( | |||||||||
| 97 | 'EXCEL-00099: Can\'t instantiate workbook object', | ||||||||||
| 98 | Error => $!, | ||||||||||
| 99 | ); | ||||||||||
| 100 | } | ||||||||||
| 101 | |||||||||||
| 102 | 1 | return $wkb; | |||||||||
| 103 | } | ||||||||||
| 104 | |||||||||||
| 105 | # ----------------------------------------------------------------------------- | ||||||||||
| 106 | |||||||||||
| 107 | =head1 VERSION | ||||||||||
| 108 | |||||||||||
| 109 | 1.240 | ||||||||||
| 110 | |||||||||||
| 111 | =head1 AUTHOR | ||||||||||
| 112 | |||||||||||
| 113 | Frank Seitz, L<http://fseitz.de/> | ||||||||||
| 114 | |||||||||||
| 115 | =head1 COPYRIGHT | ||||||||||
| 116 | |||||||||||
| 117 | Copyright (C) 2026 Frank Seitz | ||||||||||
| 118 | |||||||||||
| 119 | =head1 LICENSE | ||||||||||
| 120 | |||||||||||
| 121 | This code is free software; you can redistribute it and/or modify | ||||||||||
| 122 | it under the same terms as Perl itself. | ||||||||||
| 123 | |||||||||||
| 124 | =cut | ||||||||||
| 125 | |||||||||||
| 126 | # ----------------------------------------------------------------------------- | ||||||||||
| 127 | |||||||||||
| 128 | 1 | 1; | |||||||||
| 129 | |||||||||||
| 130 | # eof | ||||||||||