Categories > OpenTBS with XLSX >

Documentation Suggestion

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Chris
Date: 2013-09-10
Time: 12:05

Documentation Suggestion

Hello again,

I've just merged my first Excel file today, and found I had to use
$TBS->PlugIn(OPENTBS_SELECT_SHEET, 1)
before I could merge even simple onshow field.

Is this standard behaviour, and if so, could it be added to the documentation? (Or is it there and I've just missed it?!) Had me stumped for a while this morning. For the record, I've since tried it with new Excel files, in case I'd messed the first one up somehow, and found the select sheet is required. I'm creating my template in Excel 2007 on Windows, if that's of remote interest.

Cheers!
Chris

Edit: Note the demo_ms_excel.php example specifically DOESN'T include this line for merging data into the first sheet, is this perhaps something related to my set up then?
By: Skrol29
Date: 2013-09-12
Time: 02:21

Re: Documentation Suggestion

Hi Chris,

This command is actually referenced in the documentation, but under the section "Manual modification in the contents".
That is not good, I will fix that.

> Note the demo_ms_excel.php example specifically DOESN'T include this line for merging data into
> the first sheet, is this perhaps something related to my set up then?

When loading the template, the first sheet is loaded. But the first sheet in the XLSX may not be the first sheet you see in Ms Excel.
By: Chris
Date: 2013-09-14
Time: 00:39

Re: Documentation Suggestion

> When loading the template, the first sheet is loaded. But the first sheet in the XLSX may not be the first sheet you see in Ms Excel.

Ah, ok. So surely that means always putting $TBS->PlugIn(OPENTBS_SELECT_SHEET, 1) is good practice, if it's not always the sheet you wish it to be. (Or, as a change to the codebase, perhaps when you load an xlsx template, the above line should be called by default, as that's presumably the activity a user would expect?)

P.S. As a side note, because this seems a good place to state it, the support for OpenTBS over the last couple of months has been fantastic. I've had a bit of a mare with the library, trying to make it produce a relatively complex, table based docx, but there's always been help within 24 hours from yourself or Sarah Kemp, which has been brilliant - thank you for that!
By: Skrol29
Date: 2013-09-14
Time: 23:10

Re: Documentation Suggestion

> Or, as a change to the codebase, perhaps when you load an xlsx template,
> the above line should be called by default, as that's presumably the activity a user would expect?

It is a backward compatibility.
And also, the first sheet may be invisible...


> P.S. As a side note, because this seems a good place to state it, the support for OpenTBS over the last couple of months has been fantastic.
> I've had a bit of a mare with the library, trying to make it produce a relatively complex, table based docx, but there's always been help within
> 24 hours from yourself or Sarah Kemp, which has been brilliant - thank you for that!

Thanks, really.
Unfortunately the team is tiny (but strong ?).