2017 © Pedro Peláez
 

library excel-template

Replace variables in xlsx document

image

silverslice/excel-template

Replace variables in xlsx document

  • Tuesday, November 1, 2016
  • by silverslice
  • Repository
  • 5 Watchers
  • 3 Stars
  • 330 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 19 % Grown

The README.md

Easy tool for replacing variables in xlsx documents

Why

If you try to create a simple template in PHPExcel, insert some data and save it as a new file, you will see that conditional formatting is missing. PHPExcel is not a library for editing workbook files: you're not using PHPExcel to change only one string in a file and save it in the same state., (*1)

Install

composer require silverslice/excel-template, (*2)

Usage

Place variables in your xlsx-document as {foo}. Then replace them with replace method., (*3)


use Silverslice\ExcelTemplate\Template; require __DIR__ . '/vendor/autoload.php'; $template = new Template(); // open file $template->open('test.xlsx') // replace one variable to another ->replace('one', 'two') // replace once more ->replace('foo', 'bar') // save document ->save('test.xlsx');

The Versions

01/11 2016

dev-master

9999999-dev

Replace variables in xlsx document

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-zip *

 

The Development Requires

by Igor Mikheev

template excel xlsx

01/11 2016

v0.1.0

0.1.0.0

Replace variables in xlsx document

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-zip *

 

The Development Requires

by Igor Mikheev

template excel xlsx