Odd Formatting for previewing Excel Files
Asked by AJohnson:

When we try to preview a file in excel, instead of it being in an excel format, it's a PDF with the words spaced out. I uploaded a testfile to use as an example. Is there any way to correct this to look more like an excel sheet and/or automatically have it reroute to excel online to correct this?

![ExcePreviewError .PNG](/t5/image/serverpage/image-id/90356i6180AE8F4FA2ECB5/image-size/large?v=v2&px=999 "ExcePreviewError .PNG")


Answers:
author: Shardul Juyal {Addteq}
body: Hi,

Try adding all borders before attaching to the confluence page.  
If you want more functionality you can choose [Excellentable for Confluence](https://marketplace.atlassian.com/apps/1211672/excellentable-spreadsheet-for-confluence?hosting=cloud&tab=overview) to edit the excel files within confluence.  

**Sheet Imported (Edited in Google Sheets)**

![Capture 2020-03-10 at 13.35.15.png](https://community.atlassian.com/t5/image/serverpage/image-id/85959iD47E3278322DADCC/image-size/large?v=v2&px=999 "Capture 2020-03-10 at 13.35.15.png")

**Attached to Confluence with Insert--\>File\&Images**Note the slight margins of below table disappear, but remain in the above table "All borders"

**![Capture 2020-03-10 at 13.35.29.png](https://community.atlassian.com/t5/image/serverpage/image-id/85961i33499D5C784CB730/image-size/large?v=v2&px=999 "Capture 2020-03-10 at 13.35.29.png")**

**Excellentable Attach**Shows the complete spreadsheet editable within confluence

**![Capture 2020-03-10 at 13.35.57.png](https://community.atlassian.com/t5/image/serverpage/image-id/85960i60D07F750819B7A8/image-size/large?v=v2&px=999 "Capture 2020-03-10 at 13.35.57.png")**


author: Diego
body: Hello [@AJohnson](/t5/user/viewprofilepage/user-id/3746063) !

As I understand, you need the image preview generated by Confluence to look more like a "real" Excel Spreadsheet.

Let me start by first saying that ++*the preview will display visual settings added when we save the file.*++

For example, if we save the file and add borders to our table cells, the defined border will show up. Here is an example:
> ![Screen Shot 2020-04-17 at 14.45.36.png](https://community.atlassian.com/t5/image/serverpage/image-id/90972iB0F49BBF5E46FF7B/image-dimensions/488x285?v=v2 "Screen Shot 2020-04-17 at 14.45.36.png")

If we define no cell border, no border will be shown:
> ![Screen Shot 2020-04-17 at 14.46.01.png](https://community.atlassian.com/t5/image/serverpage/image-id/90973iC13105693BF46DCA/image-dimensions/485x282?v=v2 "Screen Shot 2020-04-17 at 14.46.01.png")

The rows and columns displayed by Excel are a human visual guidance so we can work on the tables.

To display files directly in our pages, we can use the Excel Macro. The excel macro displays a preview of the excel file directly on the page, no need to click on the file to preview it. However, the rows and columns are not displayed. They are present only if we specify borders for our cells before saving the file in Microsoft Excel.

Here is our documentation on this macro:
> * ++***[\[Confluence Cloud\] Office Excel Macro](https://confluence.atlassian.com/confcloud/office-excel-macro-724765234.html)***++

++*The short version is that we can add borders into our table cells and the preview will display them directly in Confluence.*++

I hope this helps!


Tags: cloud