# Resizing Excel columns

**URL:** <https://forum.inductiveautomation.com/t/resizing-excel-columns/10985>\
**Category:** General Discussion\
**Created:** [January 4, 2016, 6:45pm UTC](https://forum.inductiveautomation.com/t/resizing-excel-columns/10985 "2016-01-04T18:45:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 4, 2016, 6:45pm UTC](https://forum.inductiveautomation.com/t/resizing-excel-columns/10985/1 "2016-01-04T18:45:13Z")

</div>

I’ve been asked about automatically resizing excel columns in an exported dataset. It can be done, but it’s a pain. Mostly because there’s no friendly way to go from the length of a string to a length in pixels of a font that may (or may not) exist on a target machine. Add in anyone that has changed their Screen DPI setting, or uses a different default font on their Excel installation, and thing can get hectic in a hurry…

So this is a quick Excel tip to give your end-users. Hopefully it will make users happy, they get to learn something new, and make us look like geniuses all at the same time.

1. Select All
2. instead of dragging a column separator to resize it, double-click it. This will autosize all highlighted columns.

Here’s YouTube example to illustrate:  
[https://www.youtube.com/watch?v=QweyzuYlQCE](https://www.youtube.com/watch?v=QweyzuYlQCE)

Note: I use WPS Office instead of M$ Office, but the method is the same.
