Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SimpleXLSXGen.php #138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.4.11 (2024-02-07)
* hyperlinks to local files
* num2name static now

## 1.4.10 (2023-12-31)
* added SimpleXLSXGen::create($title = null) to create empty book with title
* added SimpleXLSXGen::save to save xlsx in current folder as {$title}.xslx or {$curdate}.xlsx
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ $xlsx = SimpleXLSX::create('My books');
$xlsx->addSheet( $books );
$xlsx->save(); // ./My books.xlsx

// Hyperlinks
$xlsx = SimpleXLSX::fromArray([
['internal link', '<a href="\'My books 2\'!A1">Go to second sheet</a>'],
['http', 'https://example.com/'], // autodetect
['http + hash', 'https://en.wikipedia.org/wiki/Office_Open_XML#References'], // autodetect
['external anchor', '<a href="https://en.wikipedia.org/wiki/Office_Open_XML#References">Open XML</a>'],
['relative link', '<a href="books.xlsx">books</a>'],
['relative link + cell addr', '<a href="..\books.xlsx#\'Sheet 2\'!A1">link to second sheet in other book</a>'],
['mailto', 'info@example.com'], // autodetect
['mailto 2', '<a href="mailto:info@example.com">Please email me</a>'],
])->addSheet([['Second sheet']], 'My books 2')->saveAs('hyperlinks.xlsx');

// Autofilter
$xlsx->autoFilter('A1:B10');

Expand All @@ -146,7 +158,8 @@ $xlsx->autoFilter('A1:B10');
$xlsx->freezePanes('C3');

// RTL mode
// Column A is on the far right, Column B is one column left of Column A, and so on. Also, information in cells is displayed in the Right to Left format.
// Column A is on the far right, Column B is one column left of Column A, and so on.
// Also, information in cells is displayed in the Right to Left format.
$xlsx->rightToLeft();

// Set Meta Data Files
Expand Down
Loading