How to find Colspan for overflowing cell values?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find Colspan for overflowing cell values?

harpreet.saini2012@gmail.com
My Excel usually has cells with values overflowing to next cell. These are not merged cells. Is there a way to find out the number of columns data is overflowing so I can add colspan to the TD tag?

For example in this screenshot https://i.stack.imgur.com/TiYEa.png you can see that text in cell A2 is overflowing to B2 (similarly A3 is overflowing to B3). If I can find out how many cells is the data overflowing to, then I can add colspan to the corresponding TD tag.

Thank you for your help.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to find Colspan for overflowing cell values?

Dominik Stadler
Hi,

You probably need to look at how Sheet.autosizeColumn() is implemented. It
calculates the length of text in cells and set the size of the whole column
to be as large as the largest one.

That should allow to compute how many cells the text actually "overflows"
into and thus provide the colspan count.

Dominik.

On Fri, May 31, 2019 at 7:22 PM [hidden email] <
[hidden email]> wrote:

> My Excel usually has cells with values overflowing to next cell. These are
> not merged cells. Is there a way to find out the number of columns data is
> overflowing so I can add colspan to the TD tag?
>
> For example in this screenshot https://i.stack.imgur.com/TiYEa.png you
> can see that text in cell A2 is overflowing to B2 (similarly A3 is
> overflowing to B3). If I can find out how many cells is the data
> overflowing to, then I can add colspan to the corresponding TD tag.
>
> Thank you for your help.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>