PHP Classes

TinyButStrong plug-in for Excel: Generate Excel spreadsheets using template plug-in

Recommend this page to a friend!
  Info   View files Example   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 64%Total: 2,732 All time: 1,385 This week: 347Up
Version License PHP version Categories
tbs_plugin_excel 1.1.0GNU Lesser Genera...5XML, PHP 5, Files and Folders, Templates
Description 

Author

This package provides a plug-in for the TinyButStrong template engine to generate spreadsheet documents in the Microsoft Excel XML format.

OpenOffice.org Calc can open those files since version 2.0, but only if the extension is ".xml".

Picture of Skrol29
Name: Skrol29 <contact>
Classes: 6 packages by
Country: France France
Age: ???
All time rank: 19213 in France France
Week rank: 91 Up5 in France France Up

Example

<?php

if (count($_GET)==0) {
   
header('Location: demo_main.htm');
    exit;
}

// load the TinyButStrong library
if (version_compare(PHP_VERSION,'5')<0) {
    include_once(
'tbs_class.php'); // TinyButStrong template engine for PHP 4
} else {
    include_once(
'tbs_class_php5.php'); // TinyButStrong template engine
}

// Excel plug-in for TBS
include('tbs_plugin_excel.php');

include(
'demo_data.php'); // Data stored in arrays

$TBS = new clsTinyButStrong;

// Install the Excel plug-in (must be before LoadTemplate)
$TBS->PlugIn(TBS_INSTALL, TBS_EXCEL);

// Load the Excel template
$TBS->LoadTemplate('demo_template.xml');

// Merge Example 1 (in sheet #1)
$TBS->MergeBlock('book',$books);

// Merge Example 2 (in sheet #2)
$TBS->MergeBlock('tsk1,tsk2',$tasks);
$TBS->MergeBlock('emp',$employees);

// Final merge and download file
$TBS->Show(TBS_EXCEL_DOWNLOAD, 'result.xml');

?>


  Files folder image Files  
File Role Description
Accessible without login Plain text file tbs_plugin_excel.php Class the plug-in
Accessible without login HTML file tbs_plugin_excel.htm Doc. Help file
Accessible without login Plain text file empty.xml Data an empty Excel template
Accessible without login Plain text file tbs_class.php Class TinyButStrong template engine ____________________
Accessible without login Plain text file demo.php Example example and test - main script
Accessible without login Plain text file demo_data.php Aux. example and test - subscript
Accessible without login HTML file demo_main.htm Data example and test - home page
Accessible without login Plain text file demo_template.xml Data example and test - Excel template

Downloadtbs_plugin_excel-2011-03-19.zip 44KB
Downloadtbs_plugin_excel-2011-03-19.tar.gz 43KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
TinyButStrong template engine Download .zip .tar.gz Template Engine version >= 3.7.0 Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,732
This week:0
All time:1,385
This week:347Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:654