Is it possible to adjust the size of the html-include macro?
Asked by Peter:

Hello,

I tried to include a page out of my MS Onedrive folder with the html-include macro.

This seem to work, but the size of the included page is not usefull --\> see Screenshot (the frame is around 4x2cm, also for published pages).

* Using the panel macro doesnt have any effect
* If i include other pages, the size seem to be more reasonable.
* By which parameters is the html-include macro defined?
* Is there a way to resize the frame?
* I tried the html macro with iframe --\> This will only show blank pages
* Are there any other ways to include external pages into confluence?

![htmlincludesize.JPG](/t5/image/serverpage/image-id/49074i111283B3A3DBB6C6/image-size/large?v=v2&px=999 "htmlincludesize.JPG")


Answers:
author: Ron_Stamm
body: Generally speaking, if you embed using the html component, you can put it in an iframe or div and give it a style with height and width, and it will change the box to that size for you. For example, \<iframe style="height:1000px;width:1400px" src="[https://docs.google.com/spreadsheets/d/somedocguid](https://docs.google.com/spreadsheets/d/1Y4OqVoGNT1GeplmX6hUuHSQsqO8cFv1lXVamvDnrOiA/edit#gid=0)"\>\</iframe\>


author: Peter
body: sorry, duplicate to the answer above.


author: Diego
body: Hello there!

Thanks for sharing this with the Community Peter.

I tried replicating this with other pages, such as Google or Microsoft's website. Both were shown multiple times larger than what we have in your screenshot.

I was not able, however, to try out with an Excel document like you did.

Also, resizing the HTML Include is not currently possible. It simply displays what is given by the URL used.

With that in mind, I would like to understand if this size problem is also present with other addresses. Would it be possible for you to try this and let us know?

Do not forget to include the URLs on your Confluence whitelist:

**[Configuring the Whitelist](https://confluence.atlassian.com/doc/configuring-the-whitelist-381255821.html)**

Looking forward to your reply.

comments: author: Peter
body: Hello Diego,

Thank you for your reply!  
I tried it with other pages, most of them seem to be on a much bigger scale!

The whitelist is already configured.

<br />

However, you can try it with my empty Excel sheet:

Link:

[https://onedrive.live.com/view.aspx?resid=B4623CDB66C6FAB6!2676\&ithint=file%2cxlsx\&authkey=!AC1_OHB2aGR7yhs](https://onedrive.live.com/view.aspx?resid=B4623CDB66C6FAB6!2676&ithint=file%2cxlsx&authkey=!AC1_OHB2aGR7yhs%C2%A0)

Do you know, how it is possible that the html-include macro works, while the html macro with an iframe shows a blank page?

Thank you for your Support


author: Diego
body: Alright Peter, I got it to work!

So, reaching out to some Microsoft documentation, I was able to find that we can **create links to embed** workbooks in websites! Here is how:
> 1. Go to your **OneDrive** and find the desired file
> 2. Now, **right click** it and click **embed** :
>    1. ![Screen Shot 2019-03-21 at 16.47.29.png](https://community.atlassian.com/t5/image/serverpage/image-id/49301i31DC4CA727368FC3/image-dimensions/162x245?v=v2 "Screen Shot 2019-03-21 at 16.47.29.png")
> 3. Now, in the **right side** select Generate to create the link:
>    1. ![Screen Shot 2019-03-21 at 16.48.03.png](https://community.atlassian.com/t5/image/serverpage/image-id/49302iE63E94949C6BD993/image-dimensions/182x270?v=v2 "Screen Shot 2019-03-21 at 16.48.03.png")
> 4. After that, the system will give you an **iframe do embed** :
>    1. ![Screen Shot 2019-03-21 at 16.48.23.png](https://community.atlassian.com/t5/image/serverpage/image-id/49303i6FA2D13C017C782E/image-dimensions/234x513?v=v2 "Screen Shot 2019-03-21 at 16.48.23.png")
> 5. Now, copy the iframe
> 6. With the iframe copied, go back to Confluence
> 7. Insert an HTML Macro
> 8. Copy the ifram
> 9. publish the page

**Notes:**

* We can edit the window appearance by clicking on "Customize how this embedded workbook will appear to others"
* You can also edit the size of your iframe when in Confluence

**Rerefence:**

* **[Share it: Embed an Excel workbook on your web page or blog from OneDrive](https://support.office.com/en-gb/article/share-it-embed-an-excel-workbook-on-your-web-page-or-blog-from-onedrive-804e1845-5662-487e-9b38-f96307144081)**

Unfortunately, the HTML Include macro is not capable of displaying a bigger version, just like you experienced. This might have to do with how Microsoft system sends information about the table we are trying to share.

Hopefully the iframe solution does it for you! Let me know your thoughts Peter.


Tags: confluence-server

html-include

macro

server