This article contain instructions on how to change the display of excel files in confluence File Preview / light box, mainly because by default, confluence file preview will truncate excel files with wide columns/ excel files with huge number of columns.

For example, below is a sample excel file with a huge number of columns:

Upon uploading to confluence, the columns will be truncated and will be displayed as below:

The preview in the “file-preview” macro depends on the width of the document itself. The Confluence File Preview macro will display the excel document as it suppose to look like if we were to print the file.

In order to fit the width of the document, we can modify the layout of the excel page by:

1、Go to Page Tools > Attachments > “Edit in Office” for the excel file that we’d like to fix
2、Go to Page Layout > Width > 1 Page :

4、Reload the confluence page
5、Confluence File Preview is displaying excel file as per desired:

Other Notes
The other layout setting seem to respond well to Confluence file preview, such as:

Orientation” setting to “Landscape” changes the orientation of the file preview in Confluence respectively
Setting the “Page Margins” will also change the previews in respectively
Please note that the “Page Layout” settings location varies in different version of Ms Excel.