Questions tagged [opentbs]

OpenTBS is a PHP tool that enables you to create MS Office, LibreOffice, and OpenOffice documents using templates. It natively supports docx, xlsx, pptx, odt, ods, and odp.

OpenTBS is a PHP tool that enables you to create MS Office, LibreOffice, and OpenOffice documents using templates. It natively supports docx, xlsx, pptx, odt, ods, and odp.

You can just create a document using MS Office, LibreOffice, or OpenOffice; you can then use this document as a template for OpenTBS, which helps you to merge data, change parts, and get the result as direct download, a saved file, or a binary string in a variable.

Some supported features :

  • Merges data items, records, blocks, conditionals blocks;
  • Change pictures in documents;
  • Change Charts in DOCX, XLSX;
  • Hide/show sheets in XLSX and ODS;
  • Delete comments;
  • Support native connectivity with MySQL, PostgreSQL, or SQLite, PDO;
  • All features of the TinyButStrong Template Engine

Links :

195 questions
4
votes
2 answers

Mergeing / modifying hyperlinks in openTBS

I've been trying to make links work in openTBS generated documents. No luck so far :( What I can do: With a bit of a hack, I can create a template with a link, and change the link caption and the href by my variables. What I can not do: Create a…
Mihaly KR
  • 2,363
  • 2
  • 19
  • 20
3
votes
1 answer

Conditional show text block in .docx using OpenTBS based on variable value

In my project I use TinyButStrong / OpenTBS to generate Word documents from templates. First I load a variable like myuser in the document. [onload;tplvars;myuser=user] The document is provided with the required variables, so I can add tags like…
nielsr
  • 2,417
  • 2
  • 15
  • 16
3
votes
1 answer

opentbs merge 2 rows in Word document table simultaneously

Here is an example of what I'm trying to achieve: Here is what my template looks like: And here is my end result: I believe it is because I have defined block as w:tr, which refers to a single row only. Is there a way to tell opentbs that the…
Matt
  • 251
  • 4
  • 13
3
votes
1 answer

Prevent Word 2010 from saving o:gfxdata base64 or uuencoded VML?

I am working with .docx files containing several drawing canvases with images inserted and some lines and arrows drawn in Word 2010. I am using 2010 format with no compatibility mode. Word inserts an o:gfxdata attribute into each v:shape and…
Sarah Kemp
  • 2,670
  • 3
  • 21
  • 29
2
votes
3 answers

Is it possible to output formats other than .docx and .odt with TinyButStrong and OpenTBS plugin

I have a module which merges a document from database records and .docx or .odt document model. I have to output .docx, .odt or .pdf. For outputting to Microsoft and Open formats, there is no problem, all works properly. But what I want to know is,…
Elorfin
  • 2,487
  • 1
  • 27
  • 50
2
votes
1 answer

How do I merge multiple Excel documents using Tiny But Strong's Excel plug in?

I am currently using TinyButStrong's Excel plugin to create numerous Excel docs that are sent out on a scheduled basis. I have been requested to break the information into separate worksheets, within a single Excel document, where each report could…
2
votes
0 answers

OpenTBS - Repeating a block of data from multiple MySQL queries

I'm trying to repeat a set of data from MySQL record set and repeat it for each query using OpenTBS. Here is my template For one query, I can merge data with $TBS->Show() method. but I want to execute multiple queries and for each query the data…
asamolion
  • 828
  • 2
  • 12
  • 24
2
votes
3 answers

How to insert conditional spaces in docx with opentbs (only if certain fields are not blank)

I am using opentbs to generate reports in .docx format from data entered by users into a form, and would like to be able to add spaces between fields conditionally. Here's the paradigm example of the issue: The user must enter a street address…
James
  • 63
  • 7
2
votes
1 answer

Enable modification of file using OpenTBS

I have some difficulties with OpenTBS. I use it to load a template and permit the user to modify this template and save it on the server after modification. When i use $TBS->Show(OPENTBS_DOWNLOAD,$file_name) it opens the file template but save it in…
Vens
  • 21
  • 3
2
votes
2 answers

Is there a way to dynamically add columns to a table in a Word document using openTBS?

I'm using openTBS to populate tables in a word document. Works great for adding rows to tables with a known amount of columns, however I want to be able to populate a table with an unknown number of rows and columns. Is there a way to achieve this?…
Matt
  • 251
  • 4
  • 13
2
votes
1 answer

OpenTBS Replace Text

Is it possible to replace text without having to create a TAG? I'm using a template to fill some data in a word document. One of the things I need to fill is the revision number, something like: "1º Revision" ([onshow.rev]) But the generated file…
jorgemfm
  • 23
  • 4
2
votes
1 answer

OpenTBS Word Document hide table

I am using TBS to create an MS Word Document from a template in PHP and trying to remove a table depending on a boolean variable. What I'm trying to do is similar to the following code, but I want to remove a table rather than an…
Dan
  • 1,447
  • 2
  • 14
  • 30
2
votes
2 answers

OpenTBS and Special Characters (PHP)

I'm using OpenTBS to modify word templates from PHP. Basically I need to update strings in a word document from values that I have in a MySQL database. It is working well, however when I have special characters such as é, à, ô, it outputs a sequence…
Mart Coul
  • 490
  • 6
  • 15
1
vote
1 answer

PHP: spreadsheet summary with OpenTBS?

I'm using the PHP library TinyButStrong with the plugin OpenTBS to merge existing Excel (or OpenOffice Calc) spreadsheets with data from a database. This works fine, but I can't figure out how to define summaries for a column. For example , I define…
Dylan
  • 9,129
  • 20
  • 96
  • 153
1
vote
1 answer

openTBS remove image when replace not found

How do you remove the image in OpenTBS if the one you are replacing it with does not exist? I have a bit of code that loops through and replaces pics in a table, but sometimes the client will not have the pictures. I tried leaving out the…
Blu Towers
  • 1,908
  • 4
  • 17
  • 20
1
2 3
12 13