B4J Question XLUtils: move chart

Chris2

Active Member
Licensed User
When using XLUtils and a template xlsx to create a spreadsheet report with a chart, is it possible to change the position of the chart once the new workbook has been created and all the data has been added?

I ask because sometimes it is not possible to know in advance how much data will be added to the spreadsheet, and it would be useful to be able to move the chart if necessary from its position in the template to where the data ends in the final spreadsheet.

Many thanks in advance.
 
Last edited:

Chris2

Active Member
Licensed User
I'd still like to know if there's a way to move charts, but a simple work-around that's sprung to mind is to put the chart at the top of the worksheet in the template and fill the report data beneath or to the right of it, or even to put the chart on a separate worksheet in the template.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'd still like to know if there's a way to move charts, but a simple work-around that's sprung to mind is to put the chart at the top of the worksheet in the template and fill the report data beneath or to the right of it, or even to put the chart on a separate worksheet in the template.
This is more or less the best solution. You can use XLSheetWriter.ShiftRows / Columns to move the chart.
 
Upvote 0

Chris2

Active Member
Licensed User
Thanks @Erel.

You can use XLSheetWriter.ShiftRows / Columns to move the chart.
This doesn't seem to move the chart. Any text in the cells is moved, but the chart stays where it is in the template.
I'm not concerned though. I think that the other options work better in my case.
 
Upvote 0
Top