Categories > TinyButStrong general >

field inside the excel text box

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Hameed
Date: 2011-06-25
Time: 18:59

field inside the excel text box

Hi there,

I am trying to merge a field inside a text box (not a cell).

Is this possible at all?

Thanks,
Hameed
By: Skrol29
Date: 2011-06-25
Time: 21:47

Re: field inside the excel text box

If your using OpenTBS, then you can merge fields placed in a text box by opening the corresponding sub-file first.
In XLSX files, text boxes are saved in a separated sub-file such as "xl/drawings/drawing1.xml"

You have to locate the drawing sub-file where is placed your text box, then you can do :
$TBS->LoadTemplate("my_workbook.xlsx");
...
$TBS->LoadTemplate("#xl/drawings/drawing1.xml");
By: Hameed
Date: 2011-06-26
Time: 03:56

Re: field inside the excel text box

This is great! Just one question.

How do I identify the drawing1.xml without hard coding it in the code. Can I reference it using a more meaningful name?

Thanks a lot!
Hameed
By: Skrol29
Date: 2011-06-26
Time: 16:13

Re: field inside the excel text box

> How do I identify the drawing1.xml without hard coding it in the code.

I use the 7-zip software to open a XLSX workseeht file as a zip file. Then I read the contents of the main XLS file, and I found the references to other XML sub-files.
You can check all file in the xl/drawings sub-directory and find the XML sub-file which contains your text box.

> Can I reference it using a more meaningful name?

No, I'm afraid.
By: Hameed
Date: 2011-06-27
Time: 00:46

Re: field inside the excel text box

OK understood. Thanks for your message.