Categories > OpenTBS with XLSX >

Updating multiple worksheets from the same data

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Iain
Date: 2015-09-03
Time: 13:46

Updating multiple worksheets from the same data

Hi, I have been using TinyButStrong for a while now to build spreadsheets with a data sheet that's populated by TinyButStrong, with a series of other worksheets with pivot tables that show views of the data.

I now want to add a second worksheet to contain only a subset of the columns in the first sheet. I have essentially copied all the columns from the first sheet, then ran it (they both had the same block name, which was a).

I then changed them all to use b, and amended the call to $TBS->MergeBlock($blockList, $data) to use 'a,b' instead of just 'a' - this also does not populate the second sheet.

I read that multiple blocks can be done, is there anything obvious that I'm missing?

Here's part of my second spreadsheet;the first is exactly the same, except with a. instead of b.

Title    First Name    Surname
[b.title;block=tbs:row]    [b.firstName]    [b.lastName]

Thanks, Iain
By: Iain
Date: 2015-09-03
Time: 14:13

Re: Updating multiple worksheets from the same data

PS I just tried amending the call to produce the spreadsheet to use use 'b' for the blocklist but that also didn't work, so there appears to be a problem with the second block.

Or does the first block need any kind of end tag to make way for the second block?
By: Iain
Date: 2015-09-03
Time: 15:08

Re: Updating multiple worksheets from the same data

After reading this article:

http://www.tinybutstrong.com/apps/forum/index.php?thr=3379

I managed to figure that I need to do:

$TBS->PlugIn(OPENTBS_SELECT_SHEET, 'other sheet name');

before running the MergeBlock command for it to work.

I now have a working version, maybe the documentation could be amended to help with merging in other sheets than the first one which seems to get found by default.

Thanks