Repository navigation
Expand file tree
/
Copy pathExcelBook.php
More file actions
897 lines (822 loc) · 22.7 KB
/
Copy pathExcelBook.php
File metadata and controls
897 lines (822 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
<?php
/*
+---------------------------------------------------------------------------+
| ExcelBook |
| |
| Reference file for NuSphere PHPEd (and possibly other IDE's) for use with |
| php_excel interface to libxl by Ilia Alshanetsky <ilia@ilia.ws> |
| |
| php_excel "PECL" style module (http://github.com/iliaal/php_excel) |
| libxl library (http://www.libxl.com) |
| |
| Rob Gagnon <rgagnon24@gmail.com> |
+---------------------------------------------------------------------------+
*/
class ExcelBook
{
const PICTURETYPE_PNG = 0;
const PICTURETYPE_JPEG = 1;
const PICTURETYPE_GIF = 2;
const PICTURETYPE_WMF = 3;
const PICTURETYPE_DIB = 4;
const PICTURETYPE_EMF = 5;
const PICTURETYPE_PICT = 6;
const PICTURETYPE_TIFF = 7;
const PICTURETYPE_SVG = 8;
const SCOPE_UNDEFINED = -2;
const SCOPE_WORKBOOK = -1;
const SHEETTYPE_SHEET = 0;
const SHEETTYPE_CHART = 1;
const SHEETTYPE_UNKNOWN = 2;
const POSITION_MOVE_AND_SIZE = 0;
const POSITION_ONLY_MOVE = 1;
const POSITION_ABSOLUTE = 2;
const CALCMODE_MANUAL = 0;
const CALCMODE_AUTO = 1;
const CALCMODE_AUTONOTABLE = 2;
const CELLSTYLE_NORMAL = 0;
const CELLSTYLE_BAD = 1;
const CELLSTYLE_GOOD = 2;
const CELLSTYLE_NEUTRAL = 3;
const CELLSTYLE_CALC = 4;
const CELLSTYLE_CHECKCELL = 5;
const CELLSTYLE_EXPLANATORY = 6;
const CELLSTYLE_INPUT = 7;
const CELLSTYLE_OUTPUT = 8;
const CELLSTYLE_HYPERLINK = 9;
const CELLSTYLE_LINKEDCELL = 10;
const CELLSTYLE_NOTE = 11;
const CELLSTYLE_WARNING = 12;
const CELLSTYLE_TITLE = 13;
const CELLSTYLE_HEADING1 = 14;
const CELLSTYLE_HEADING2 = 15;
const CELLSTYLE_HEADING3 = 16;
const CELLSTYLE_HEADING4 = 17;
const CELLSTYLE_TOTAL = 18;
const CELLSTYLE_COMMA = 43;
const CELLSTYLE_COMMA0 = 44;
const CELLSTYLE_CURRENCY = 45;
const CELLSTYLE_CURRENCY0 = 46;
const CELLSTYLE_PERCENT = 47;
/**
* Create a new Excel workbook
*
* @param string|null $license_name (optional, default=null)
* @param string|null $license_key (optional, default=null)
* @param bool $excel_2007 (optional, default=false)
* @return ExcelBook
*/
public function __construct(?string $license_name = null, ?string $license_key = null, bool $excel_2007 = false)
{
}
/**
* Returns whether the library requires a license key
*
* @return bool
*/
public static function requiresKey(): bool
{
}
/**
* Add or copy an ExcelFont object
*
* @param ExcelFont $font (optional, default=null) Font to copy
* @return ExcelFont|false
*/
public function addFont(?ExcelFont $font = null): ExcelFont|false
{
}
/**
* Add or copy an ExcelFormat object
*
* @param ExcelFormat|null $format (optional, default=null) Format to copy
* @return ExcelFormat|false
*/
public function addFormat(?ExcelFormat $format = null): ExcelFormat|false
{
}
/**
* Get an array of all ExcelFormat objects used inside a workbook
*
* @return array|false Array of ExcelFormat objects
*/
public function getAllFormats(): array|false
{
}
/**
* Get the current workbook's Excel error string
*
* LibXL load failures occur on a temporary workbook: inspect their warning
* instead of expecting the load error here. See ExcelBook::load().
*
* @return string|false Description of last error, or false if no error
*/
public function getError(): string|false
{
}
/**
* Load Excel from file
*
* A successful load replaces the workbook and invalidates existing child
* wrappers (ExcelSheet, ExcelFont, ExcelFormat, ExcelAutoFilter, ...).
* Fetch new wrappers after success. A failed load leaves the previous
* workbook and its live wrappers usable; it does not adopt partial data.
* This guarantee does not undo changes made by user stream callbacks or
* error handlers. Exceptions from those callbacks propagate.
*
* A LibXL load failure returns false and emits an E_WARNING containing the
* load error. That error belongs to a temporary workbook and is not retained
* by getError() or errorCode(). Input validation and stream failures can
* return false earlier; an empty string returns false without a warning.
*
* The filename resolves like fopen(): a "data:" name, or any path while
* file: is replaced by a user wrapper, is read through that wrapper. Only
* names PHP opens as plain files are passed to LibXL directly. The same
* rule applies to loadFilePartially(), loadInfo(), and addPictureFromFile();
* loadFileWithoutEmptyCells() rejects wrapper names.
*
* @note Stream sources are fully buffered (cap UINT_MAX); enforce an app-side size bound first, e.g. `if (filesize($path) > $maxBytes) throw new RuntimeException('spreadsheet too large');`. See SECURITY.md.
* @param string $filename
* @return bool
*/
public function loadFile(string $filename): bool
{
}
/**
* Load a row slice from Excel data string
*
* @see ExcelBook::load() for success-only wrapper invalidation and failure diagnostics
*
* @note Stream sources are fully buffered (cap UINT_MAX); enforce an app-side size bound first. See ExcelBook::loadFile() for an example.
* @since libxl 5.0.0
* @param string $data
* @param int $sheet_index 0-based sheet index to load
* @param int $row_first First 0-based row to load
* @param int $row_last Last 0-based row to load
* @param bool $keep_all_sheets (optional, default=false)
* @return bool
*/
public function loadPartially(string $data, int $sheet_index, int $row_first, int $row_last, bool $keep_all_sheets = false): bool
{
}
/**
* Load a row slice from Excel file
*
* @see ExcelBook::load() for success-only wrapper invalidation and failure diagnostics
*
* @since libxl 5.0.0
* @param string $filename
* @param int $sheet_index 0-based sheet index to load
* @param int $row_first First 0-based row to load
* @param int $row_last Last 0-based row to load
* @param bool $keep_all_sheets (optional, default=false)
* @return bool
*/
public function loadFilePartially(string $filename, int $sheet_index, int $row_first, int $row_last, bool $keep_all_sheets = false): bool
{
}
/**
* Load Excel from file without empty cells (xls format only; libxl does not
* support this for xlsx files and the call fails with a warning on such books)
*
* @see ExcelBook::load() for success-only wrapper invalidation and failure diagnostics
*
* @since libxl 5.0.0
* @param string $filename Plain filesystem path
* @return bool
*/
public function loadFileWithoutEmptyCells(string $filename): bool
{
}
/**
* Load Excel data string
*
* A successful load replaces the workbook and invalidates existing child
* wrappers (ExcelSheet, ExcelFont, ExcelFormat, ExcelAutoFilter, ...).
* Fetch new wrappers after success. A failed load leaves the previous
* workbook and its live wrappers usable; it does not adopt partial data.
* This guarantee does not undo changes made by user stream callbacks or
* error handlers. Exceptions from those callbacks propagate.
*
* A LibXL load failure returns false and emits an E_WARNING containing the
* load error. That error belongs to a temporary workbook and is not retained
* by getError() or errorCode(). Input validation and stream failures can
* return false earlier; an empty string returns false without a warning.
*
* @note Stream sources are fully buffered (cap UINT_MAX); enforce an app-side size bound first. See ExcelBook::loadFile() for an example.
* @param string $data
* @return bool
*/
public function load(string $data): bool
{
}
/**
* Save Excel file
*
* Saves through PHP user-defined stream wrappers write the workbook to a
* sibling staging URL first. A short or failed staged write leaves the
* destination untouched and is never retried against it. A rename() method,
* including one handled by __call(), that fails or throws also fails closed.
* Without rename() or __call(), a complete staged write falls back to a warned
* non-atomic direct write. If unlink() is also unavailable, the staging file
* remains because PHP's adapter advertises both operations anyway.
* Native stream wrappers without rename/unlink support write directly.
* A name PHP resolves to a user wrapper takes this route even without
* "://": data: names, and every plain path while file: is replaced. Such a
* save writes the workbook as it was when save() was called, even if a
* wrapper callback reloads or reinitializes this book.
* With an empty filename, save() returns the workbook as a binary string.
*
* @param string $filename (optional, default="") If empty or omitted, returns binary string
* @return string|bool If $filename is empty or omitted, returns string; otherwise returns bool
*/
public function save(string $filename = ''): string|bool
{
}
/**
* Get an Excel worksheet
*
* @param int $sheet_number (optional, default=0) 0-based worksheet number
* @return ExcelSheet|false
*/
public function getSheet(int $sheet = 0): ExcelSheet|false
{
}
/**
* Get an excel sheet by name
*
* @param string $name
* @param bool $case_insensitive (optional, default=false)
* @return ExcelSheet|false
*/
public function getSheetByName(string $name, bool $case_insensitive = false): ExcelSheet|false
{
}
/**
* Add a worksheet to a workbook
*
* @param string $name The name for the new worksheet
* @return ExcelSheet|false
*/
public function addSheet(string $name): ExcelSheet|false
{
}
/**
* Create a copy of a worksheet in a workbook
*
* @param string $name The name for the new worksheet
* @param int $sheet_number The 0-based number of the source worksheet to copy
* @return ExcelSheet|false
*/
public function copySheet(string $name, int $sheet_number): ExcelSheet|false
{
}
/**
* Delete an Excel worksheet
*
* On success, all existing ExcelSheet wrappers from this workbook become
* stale, including surviving sheets and their sheet-owned wrappers
* (autofilters, filter columns, tables, form controls, conditional formatting).
* Re-fetch surviving sheets with getSheet() or getSheetByName(), then obtain
* their children again. Later sheet indexes shift after deletion. Calls on
* stale wrappers warn and return false; constructors given stale sheet-owned
* wrappers throw an exception. Workbook-owned fonts and formats remain usable.
* A failed deletion leaves existing wrappers usable.
*
* @see ExcelBook::getSheet()
* @see ExcelBook::getSheetByName()
* @param int $sheet 0-based worksheet number to delete
* @return bool True on success, false on failure
*/
public function deleteSheet(int $sheet): bool
{
}
/**
* Get the number of worksheets inside a workbook
*
* @return int|false
*/
public function sheetCount(): int|false
{
}
/**
* Get or set the active Excel worksheet number
*
* @see ExcelBook::getActiveSheet()
* @see ExcelBook::setActiveSheet()
* @param int $sheet_number (optional) If supplied, the 0-based worksheet number to set as active
* @return int|false 0-based active worksheet number
*/
public function activeSheet(int $sheet = -1): int|false
{
}
/**
* Get a custom cell format
*
* @see ExcelBook::addCustomFormat()
* @param int $id
* @return string|false
*/
public function getCustomFormat(int $id): string|false
{
}
/**
* Create a custom cell format
*
* @see ExcelBook::getCustomFormat()
* @param string $format_string
* @return int|false The ID assigned to the new format
*/
public function addCustomFormat(string $format): int|false
{
}
/**
* Pack a unix timestamp into an Excel double using PHP's configured timezone
*
* @see ExcelBook::unpackDate()
* @param int $timestamp
* @return float|false
*/
public function packDate(int $timestamp): float|false
{
}
/**
* Pack a date from single values into an Excel double
*
* @param int $year
* @param int $month
* @param int $day
* @param int $hour
* @param int $min
* @param int $sec
* @return float|false
*/
public function packDateValues(int $year, int $month, int $day, int $hour, int $min, int $sec): float|false
{
}
/**
* Unpack an Excel double into a unix timestamp using PHP's configured timezone
*
* Time-only serials in [0, 1) return seconds since midnight. Calendar dates
* outside the platform's PHP integer range return false.
*
* @see ExcelBook::packDate()
* @param float $date
* @return int|false
*/
public function unpackDate(float $date): int|false
{
}
/**
* Get the active worksheet inside a workbook
*
* @see ExcelBook::activeSheet()
* @see ExcelBook::setActiveSheet()
* @return int|false 0-based active worksheet number
*/
public function getActiveSheet(): int|false
{
}
/**
* Set the active worksheet
*
* @see ExcelBook::getActiveSheet()
* @see ExcelBook::activeSheet()
* @param int $sheet_number 0-based worksheet to make active
* @return bool
*/
public function setActiveSheet(int $sheet): bool
{
}
/**
* Get the default font
*
* @see ExcelBook::setDefaultFont()
* @return array|false Array with keys "font"(string) and "font_size"(int)
*/
public function getDefaultFont(): array|false
{
}
/**
* Set the default font and size
*
* @see ExcelBook::getDefaultFont()
* @param string $font
* @param int $font_size
* @return void
*/
public function setDefaultFont(string $font, int $font_size): mixed
{
}
/**
* Set the encoding of text passed to and returned by this workbook
*
* Every workbook starts in UTF-8 mode: LibXL decodes and encodes text as
* UTF-8 whatever the process locale is. Call this method only for text in
* another byte encoding, for example setLocale('de_DE.ISO-8859-1') for
* Latin-1 strings. LibXL then converts text with the C library under that
* locale, and switches the process LC_CTYPE to it. Pass "UTF-8" to return
* to the default.
*
* A reload keeps the locale accepted last. If LibXL rejects the locale
* name, the method emits a warning, returns false, and the workbook keeps
* its previous locale. An empty string returns false and changes nothing.
*
* @param string $locale
* @return bool
*/
public function setLocale(string $locale): mixed
{
}
/**
* Add a picture from file
*
* The filename resolves like fopen(), including "data:" names; see
* ExcelBook::loadFile().
*
* @note Stream sources are fully buffered (cap UINT_MAX); enforce an app-side size bound first. See ExcelBook::loadFile() for an example.
* @see ExcelBook::addPictureFromString()
* @see ExcelSheet::addPictureScaled()
* @see ExcelSheet::addPictureDim()
* @param string $filename
* @return int|false A picture ID
*/
public function addPictureFromFile(string $filename): int|false
{
}
/**
* Add a picture from string
*
* @see ExcelBook::addPictureFromFile()
* @see ExcelSheet::addPictureScaled()
* @see ExcelSheet::addPictureDim()
* @param string $data
* @return int|false A picture ID
*/
public function addPictureFromString(string $data): int|false
{
}
/**
* Returns whether RGB mode is active
*
* @see ExcelBook::setRGBMode()
* @return bool
*/
public function rgbMode(): bool
{
}
/**
* Sets RGB mode on or off
*
* @see ExcelBook::rgbMode()
* @param bool $mode
* @return bool
*/
public function setRGBMode(bool $mode): bool
{
}
/**
* Packs red, green, and blue components in color value. Used for xlsx format only.
*
* @see ExcelBook::colorUnpack()
* @param int $r
* @param int $g
* @param int $b
* @return int|false
*/
public function colorPack(int $r, int $g, int $b): int|false
{
}
/**
* Unpacks an XLS palette color or XLSX color value into red, green, and blue components.
*
* @see ExcelBook::colorPack()
* @param int $color One of ExcelFormat::COLOR_* constants
* @return array|false Array with keys "red"(int), "green"(int), and "blue"(int), or false with a
* warning when the color has no RGB value. In xls books only palette colors 8..63 have RGB values;
* automatic colors such as ExcelFormat::COLOR_DEFAULT_FOREGROUND (0x40), 0x41, and 0x7FFF return false.
*/
public function colorUnpack(int $color): array|false
{
}
/**
* Returns whether the 1904 date system is active
*
* @return bool
*/
public function isDate1904(): bool
{
}
/**
* Sets the date system mode
*
* @param bool $date_type true for 1904, false for 1900
* @return bool
*/
public function setDate1904(bool $date_type): bool
{
}
/**
* Returns BIFF version of binary file. Used for xls format only.
*
* @return int|false
*/
public function biffVersion(): int|false
{
}
/**
* Sets the R1C1 reference mode
*
* @param bool $active
* @return bool
*/
public function setRefR1C1(bool $active): bool
{
}
/**
* Returns whether the R1C1 reference mode is active
*
* @return bool
*/
public function getRefR1C1(): bool
{
}
/**
* Returns a picture at position index
*
* @param int $index
* @return array|false Array with keys "data"(string) and "type"(int); "data" is an empty string for a picture added with addPictureAsLink() without embedding
*/
public function getPicture(int $index): array|false
{
}
/**
* Returns a number of pictures in this workbook
*
* @return int|false
*/
public function getNumPictures(): int|false
{
}
/**
* Inserts a new sheet at position index
*
* @param int $index
* @param string $name
* @param ExcelSheet|null $sheet (optional) Existing sheet from this workbook to copy
* @return ExcelSheet|false
*/
public function insertSheet(int $index, string $name, ?ExcelSheet $sheet = null): ExcelSheet|false
{
}
/**
* Returns whether the workbook is a template
*
* @return bool
*/
public function isTemplate(): bool
{
}
/**
* Sets the template flag
*
* @param bool $mode
* @return bool
*/
public function setTemplate(bool $mode): bool
{
}
/**
* Returns type of sheet with specified index
*
* @param int $sheet
* @return int|false One of ExcelBook::SHEETTYPE_* constants
*/
public function sheetType(int $sheet): int|false
{
}
/**
* Get LibXL version
*
* @return string
*/
public function getLibXlVersion(): string
{
}
/**
* Get PHP excel extension version
*
* @return string
*/
public function getPhpExcelVersion(): string
{
}
/**
* Adds a picture to the workbook as link (only for xlsx files)
*
* @note The path persists as an external relationship (UNC/http included); allowlist caller-supplied paths and never pass untrusted input as the link target.
* @param string $filename
* @param bool $insert (optional, default=false) false stores only a link, true stores picture and link
* @return int|false Picture identifier
*/
public function addPictureAsLink(string $filename, bool $insert = false): int|false
{
}
/**
* Moves a sheet with specified index to a new position
*
* @param int $src_index
* @param int $dest_index
* @return bool
*/
public function moveSheet(int $src_index, int $dest_index): bool
{
}
/**
* Load Excel sheet info without loading the full file
*
* On success the book enters info-only mode: only sheetCount(), getSheetName(),
* the load*() methods, clear(), __construct(), getLibXlVersion(),
* getPhpExcelVersion(), and requiresKey() work. Every other ExcelBook method
* emits a warning and returns false. The ExcelFont, ExcelFormat, ExcelSheet,
* ExcelRichString, ExcelConditionalFormat, and ExcelCoreProperties constructors
* throw when given this book. A successful full load*(), clear(), or
* __construct() call leaves info-only mode.
*
* @see ExcelBook::load() for success-only wrapper invalidation and failure diagnostics
*
* @note Stream sources are fully buffered (cap UINT_MAX); enforce an app-side size bound first. See ExcelBook::loadFile() for an example.
* @param string $filename
* @return bool
*/
public function loadInfo(string $filename): bool
{
}
/**
* Returns the sheet name by index
*
* @param int $index
* @return string|false
*/
public function getSheetName(int $index): string|false
{
}
/**
* Creates a new rich string
*
* @return ExcelRichString|false
*/
public function addRichString(): ExcelRichString|false
{
}
/**
* Returns the calculation mode
*
* @return int|false One of ExcelBook::CALCMODE_* constants
*/
public function calcMode(): int|false
{
}
/**
* Sets the calculation mode
*
* @param int $mode One of ExcelBook::CALCMODE_* constants
* @return bool
*/
public function setCalcMode(int $mode): bool
{
}
/**
* Creates a new conditional format
*
* @return ExcelConditionalFormat|false
*/
public function addConditionalFormat(): ExcelConditionalFormat|false
{
}
/**
* Creates a new format from a predefined cell style
*
* @param int $style One of ExcelBook::CELLSTYLE_* constants
* @return ExcelFormat|false
*/
public function addFormatFromStyle(int $style): ExcelFormat|false
{
}
/**
* Removes VBA module from the workbook
*
* @return bool
*/
public function removeVBA(): bool
{
}
/**
* Removes printer settings from all sheets
*
* @return bool
*/
public function removePrinterSettings(): bool
{
}
/**
* Sets password for the workbook (xlsx only)
*
* @since libxl 5.0.0
* @param string $password
* @return bool
*/
public function setPassword(string $password): bool
{
}
/**
* Returns the DPI awareness mode
*
* @since libxl 5.0.0
* @return int|false
*/
public function dpiAwareness(): int|false
{
}
/**
* Sets the DPI awareness mode
*
* @since libxl 5.0.0
* @param int $value
* @return bool
*/
public function setDpiAwareness(int $value): bool
{
}
/**
* Load Excel sheet info from raw data without loading the full file
*
* On success the book enters the same info-only mode as loadInfo().
*
* @see ExcelBook::loadInfo() for the methods available in info-only mode
* @see ExcelBook::load() for success-only wrapper invalidation and failure diagnostics
*
* @since libxl 5.0.1
* @param string $data
* @return bool
*/
public function loadInfoRaw(string $data): bool
{
}
/**
* Returns the current workbook's error code
*
* LibXL load errors are emitted as warnings, not retained on this workbook.
* @see ExcelBook::load()
*
* @since libxl 5.1.0
* @return int|false
*/
public function errorCode(): int|false
{
}
/**
* Returns a conditional format by index
*
* @since libxl 5.1.0
* @param int $index
* @return ExcelConditionalFormat|false
*/
public function conditionalFormat(int $index): ExcelConditionalFormat|false
{
}
/**
* Returns the number of conditional formats
*
* @since libxl 5.1.0
* @return int|false
*/
public function conditionalFormatSize(): int|false
{
}
/**
* Clears the workbook
*
* @since libxl 5.1.0
* @return bool
*/
public function clear(): bool
{
}
/**
* Returns the core properties object for the workbook
*
* @return ExcelCoreProperties|false
*/
public function coreProperties(): ExcelCoreProperties|false
{
}
/**
* Removes all phonetic runs from the workbook
*
* @return bool
*/
public function removeAllPhonetics(): bool
{
}
} // end ExcelBook