323
Views
4
Comments
[Advanced Excel] Set column size
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Traditional Web

Is there any method to set the size of a column? I can't seem to find it. 

My use case is that I want people to download a template file that can be used to import data in the application. There are hidden sheets with data and pulldowns on the first sheet pointing to the data, so we prevent mistyped data. I would like to have the columns usable widths so they can start using it right away. And since there data is not yet there the Autofit doesn't work correctly.

Greetings,

Vincent

UserImage.jpg
Pranav Shingane

Hi @Vincent Koning ,

What i understand from your issue is. You can try for following

Make AutofitColumn property to Yes

This will make Auto fit size according to your column name. If there is no data still it will be visible

Refer image or this not able to solve your problem the please specify in detail

Excel.JPG
2020-09-21 08-42-47
Vincent Koning

Hi PSS, 

Like I said, I don't want to use Autofit because the columns are empty except for the header name. And some header names only have a few characters, but the data will a lot larger. So, I want to make sure that the column is already wide enough to hold around 80% of the use cases. And no, having longer header names is also not the solution since that will be unfamiliar for our end-users.

Greetings,

Vincent

UserImage.jpg
Pranav Shingane

Hi @Vincent Koning ,

Please share some images of excel or related to work for better understanding

2020-09-21 08-42-47
Vincent Koning

Hi Runar,

Hereby some images;

When we open the generate template file we see the following columns. Note that D2 is a dropdown with prefilled values usable by the application. If we look at these values we see the following;

The values in the dropdown are a lot wider then the column is. We see the following when we select a few of these values;

As you can see that without manually changing the width of the column the data is cutoff. Note that I also filled in data in the E column to better show the cutoff.

What I want to do is programmatically set the column width. Either by autodetection of the widest possible value of by setting the width with a predetermined value. Currently this component does not have the capability to change the column width. It does only allow to use auto-width which is not suitable because we supply a blanc template and thus the width of the headers text is used.

Note that I now focused on the Dropdown entries but the same goes for the *Name columns and the Email column. I would really like to have these wider by default instead of the current width set by auto-size.

Greetings,

Vincent

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.