Search the Confluence 4.1.x Documentation:

Index
Downloads (PDF, HTML & XML formats)
Other versions

This documentation relates to Confluence 4.1.x
If you are using an earlier version, please view the previous versions of the Confluence documentation and select the relevant version.
Skip to end of metadata
Go to start of metadata

The View File macro allows you to embed an Office or PDF document into your Confluence page. First attach the document to a wiki page and then use one of the View File macros to display the document's content.

When users view the page, they will see the content of the Office document. Users do not need to have Office installed in order to see the content of the Office document. If they do have Office installed, users will be able to open the document for editing in their Office application.

For a full list of Office Connector prerequisites and limitations, please refer to:

For an overview of all Office Connector features, please refer to Working with the Office Connector.

On this page:

Displaying an Office or PDF Document in Confluence

To display an Office or PDF document in a page, use one of the following View File macros in the Macro Browser:

  • Office Excel
  • Office Powerpoint
  • Office Word
  • PDF

To add one of the View File macros to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

Parameters for the Office and PDF Macros

When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.

Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.

Macro

Parameter

Default

Description

All View File macros

Page Name

The page which contains the macro

Enter a page name, if you wish to display a document which is attached to another Confluence page.

 

File Name

none

The file name of the Office or PDF document to be displayed. The document must be attached to a page on your Confluence site.

Office Excel

Show Grid?

true

Select to show grid lines around each cell of the Excel spreadsheet. Clear to hide these grid lines.

Worksheet Name

Last worksheet viewed in the spreadsheet

The name of the worksheet that you want displayed.

Last Row

Last row with content

The number of the last row you want displayed, starting from '0' as the first row.

Last Column

Last column with content

The number of the last column you want displayed, starting from '0' as the first column.

Office

Powerpoint

 

 

Height

 

Specify the height of the display, in pixels (default) or as a percentage of the window's height.

Slide Number

none

Specify the number of the slide that you want displayed on the Confluence page, where the first slide is numbered zero. Instead of a slide show, the page will display just the single slide, represented as a JPEG image.

Width

 

Specify the width of the display, in pixels (default) or as a percentage of the window's width.

Reducing the size of the spreadsheet

Use the Last Column and Last Row parameters to reduce the size of the spreadsheet displayed on the wiki page. This is especially useful to prevent the display from showing empty cells. This will also help to prevent 'out of memory' errors.

Presentation display options

By default, a presentation is displayed as a dynamic slide show, using Adobe Flash Player. However, you can use the Slide Number parameter to display just one of the slides as a static JPEG image.

Editing a Word Document or Excel Spreadsheet

When viewing a wiki page that displays an attached Office document, you can launch your Office editor directly from Confluence by clicking the title bar of the document.

You will find detailed instructions in Editing an Office Document from Confluence.

Troubleshooting

Problems? Please refer to our guide to the Office Connector limitations and known issues.

Related Topics

Take me back to the Confluence User's Guide.

  1. Jan 09, 2009

    Anonymous

    The quality of my embedded PDF displayed on confluence is seriously lower than that of the original PDF, to the point where you can't read the text in the images, and have trouble with some parts of the doc itself.

    Is this as designed? And is there a parameter I can use to disable this quality drop?

    1. Jan 09, 2009

      I'm hoping there's some help for this one.

      1. Jan 12, 2009

        Hi Patrick,

        This issue is by design. I have seen your bug report here, however, we have an existing bug report for general Confluence users:

        As a workaround, you might want to adjust the width and height of the macro to get clearer display, for instance:

        {viewfile:my.pdf|width=800|height=1000}
        

        Hope that helps.

        Cheers,
        Azwandi

    2. Apr 18, 2010

      Hi,

      yes the viewfile macro generates a PDF view with a poor quality. It is that bad, that I cant use it and it also does not handle large files correctly.

      But WiKi stands for fast access and a WiKi is made for HTML an WiKiML, so no wonder why it does handle PDF not the same way as a specific program for PDF. There are programs available to transfer PDF to HTML or other formats, so that you can generate a WiKi page and to attach the original PDF to that page. Those programs extract text as formatted and pictures.  With that you get WiKi advantages combined with  standard usage of PDF.

      I use to embed smaller PDF like following for example

      to display PDF. This works fine for files up to 10MB over internet access. For larger files it is not that cool, as the whole file has to be loaded. It might be useful to split larger files into smaller parts maybe like chapters of a book. 

      This works on Mac OS X and Windows with Safari and Firefox with high quality. You wount get a window inside the page on Mac OS X with buttons but you can use the standard browser or operating system contextual features to change size, download etc. On Widows you get all Adobe functions too. I have to look into it again, to find out how to get all functions as buttons displayed on Mac OS X too.

      You have to make sure that the internet plugins for PDF, Flash etc. are installed to have all the functions available.

    3. Nov 15, 2010

      We released a new plugin called SharpView that addresses the embedded PDF resolution issue and also allows for additional features of zoom, search, print, etc.. Here's some info, as well as an embedded example.

      We also released Google Docs connector for Confluence, which provides some similar options to the Office Connector (i.e., embedded PPT, PDF, spreadsheets, docs, lists, etc..) - as well as the embedded SharpView features.

      Please check them out - and let us know what you think! Love your feedback. thanks.

      1. Nov 16, 2010

        Hi Ellen, – seems to be an appropriate solution.

        I need to find out what effect your plugin has as it needs additional software to be installed on confluence servers. We do run Mac and Windows Servers now which have natively all whats needed to view PDF in high quality within confluence. So we quite do not really understand, why extra software is needed to be installed which seem to effect server side port settings to do so. (we just took a short view!)

        The current problem is that available Plugins do have minor but inconvenient inappropriate macro-editor workflows for users or dont activate SVG features which are available on a standard native basis.

        Originally I just wanted to find out if SharpView provides a better solution on PDF Workflows and if so it would’t matter to pay for it, because  a faster and smoother running workflow would save time and money on the other hand.

        Please post more information about compatibility, security and why extra software needs to be installed etc on your home page.

        Cheers.

  2. Jan 27, 2009

    Anonymous

    I have a powerpoint presentation that contain mostly tables or pictures of tables.  When I attach the file and the use the viewfile macro - all of the colors and some of the gridlines in the table disappear.  Any suggestions?

    1. Feb 13, 2009

      Hi,

      Unfortunately, I can't seem to reproduce this problem in my local instance. Feel free to raise a support ticket at https://support.atlassian.com for further investigation. You might want to attach an example powerpoint slides to the ticket.

      Cheers,
      Komathi

    2. Feb 13, 2009

      I have a similar problem. I am never sure if a PowerPoint will be displayed correctly by the viewfile macro, therefore we decided to convert all the PPT to Adobe PDF. It is very time consuming to go through each PPT (sometimes 10's or >100 slides) and compare with the original, to check if they are displayed right or wrong.

      But now, we are experiencing another, even worse, problem (look some posts below) displaying the files. They are not showing up at all.

      Good luck to us all!

  3. Feb 10, 2009

    Is it possible to allow this macro to view text attachment files.

    e.g.

     
    {viewfile:config.txt}
    

    would output the text with the {noformat} tags around it, so its framed and in a fixed pitch font.

    1. Feb 12, 2009

      Hi Gary,

      As far as I am concern the {viewfile} macro cannot render .txt file. Feel free to raise a future request here: http://jira.atlassian.com for future implementation.

      Cheers,
      Komathi

  4. Feb 10, 2009

    Hi,

    Is it possible that I can control programatically when I change slides in the power point presentation?

    Any help would be greatly appreciated.

    Thanks

    1. Feb 18, 2009

      Hi Ginil,

      Unfortunately this feature is not implemented yet. Feel free to raise a feature request at http://jira.atlassian.com. and describe more in details how you want this feature to work. Vote for it and add yourself as watcher. For further details on Implementation of New Feature and Improvement please browse to the attached link.

      Hope that helps.

      Cheers,
      Komathi

  5. Feb 12, 2009

    I have been having trouble displaying

    !xxxx.swf!
    

    I only get a blank space

    And

    {viewfile:xxxx.ppt} or {viewfile:xxxx.pdf}
    

    I get

    Alternate HTML content should be placed here. This content requires the Adobe Flash Player. Get Flash
    

    I recently installed Adobe Flash Player v10 , and thought that could be the cause, by I reverted to v9, and could not solve the problem.

    Have you heard any problems like these?

    Thanks.

    1. Feb 17, 2009

      Hi Guillermo,

      Are you using Internet Explorer? If so, there is a known compatibility issue with Adobe Flash Player 10 and Internet Explorer, which was identified in Confluence 2.10.

      A fix for this has been implemented in Confluence 2.10.2 which is now available for download. Please see the Confluence 2.10.2 Release Notes for further information.

      Nevertheless, there should not be any problems viewing these objects with Adobe Flash Player 10 and Mozilla Firefox.

      If this is not the issue, then please feel free to log a JIRA issue.

      Best regards,

      Giles Gaskell
      Technical Writer
      ggaskell@atlassian.com
      ATLASSIAN - http://www.atlassian.com

      1. Feb 26, 2009

        Upgrading to 2.10.2 solved my problem - thanks.

        1. Mar 11, 2009

          Solved.

          Some problems are usually solved by rebooting the application or server, too.

          Thanks.

  6. Feb 16, 2009

    Hi,

    At times the quality of a PDF shown with viewfile is dramatic; all text becomes blurry and detail is difficult to discern even on full-screen mode.

    The weird thing is that the PDF itself seems to be of good quality, if reading it with Adobe Reader. Any idea?

    1. Feb 16, 2009

      It is known that PDF quality will decrease in the {viewfile} macro. Please see the improvement request at http://developer.atlassian.com/jira/browse/WORDDV-219

      1. Nov 28, 2011

        Anonymous

        Is this still an issue?? I seems to be but the the issue link you provided results in a "Page not Found" Confluence error.

  7. Mar 11, 2009

    Is the view file macro (editing feature with hidden title bar specifically) and the Office Connector in general section 508 compliant (Section 508 of the Rehabilitation Act of 1973)?

    1. Mar 15, 2009

      Hi, Matt. You might be interested in the following bug report, which discusses this requirement in general:

      Hope that helps!

  8. Mar 11, 2009

    Viewfile is not working with the new MS Office versions of powerpoint and word (pptx, and docx).

    Viewfile is not displaying PDF's created from the new MS Office suite either

    Do you know if there is any work done to support those?

    Thank you

    1. Mar 15, 2009

      Hi,

      In case you have not seen them, the following are related improvement requests:

      Confluence uses Apache POI to extract the contents of the Microsoft Office documents. In the advent of support for Office 2007 (Office Open XML Support) files in the current beta version of the library, this might be possible in the near future. Please watch the bug reports to keep yourself updated. Hope that helps!

      Cheers,
      Azwandi

  9. Mar 24, 2009

    Hi.

    While the view file macro seems to work well, the performance is too slow to be a practical feature. It might take 30 seconds to load an excel file into a webpage. Everything else seems to run nice and fast.

    Is it normal for it to take ages to load spreadsheets? I hate to imagine how slow it would be if multiple people tried to use it at the same time.

    Sometimes I also get an error which I think is related to memory as I ran the command to use 512RAM and that fixed the problem for one spreadsheet. Is it supposed to use lots of memory?

    If it is normal to be slow and performance hungry is there another way to be able to open, edit and save spreadsheets from confluence? The only other way I can find is with webdav (which has it's own problems and I don't want to make it available to everyone). How come when I open spreadsheets from the attachments page it can't just open it the same way it does from the view file macro? that is how come I can't save them? Is there a way to make this work? a plugin maybe? Or is this by design so you can keep track of versioning etc?

    1. Mar 30, 2009

      Hello Michael,

      Some conversions will take longer, especially for documents containing complex data, charts, images, figures, etc. Perhaps, the request WORDDV-126 - Conversion queue to optimize performance would be a relief for this issue. However, if you encounter an outstanding out of memory problem due to simple conversion, please do let us know.

      Opening the attachments from the attachments page will only ask your browser to download a copy of the attachment and place it in your machine's temp folder - your OS will then open that in an appropriate application.

      Cheers,
      Azwandi

  10. Apr 01, 2009

    Hello,

    When using the viewfile macro in Confluence 2.10.1 to display the contents of a Powerpoint file with Japanese text,
    nothing was displayed.

    Is this a known issue with double-byte characters and is there a solution to this problem?

    thanks,

    Neeraj

  11. Apr 09, 2009

    Is there a way to specify a sheet number instead of a sheet name when using viewfile with Excel files? I'm using scaffolding and reporting to allow end users to select the excel file they want to display, and to select which sheet to display. But I have no way to know the sheet names, so I want to use sheet numbers.

    Thanks!

    1. Aug 10, 2009

      Hi Shawn,

      I am afraid that this is not currently possible in Confluence. Feel free to raise a feature request at http://jira.atlassian.com. and describe in detail how you require this feature to work. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

      Hope that helps.

      Cheers
      JSashi

  12. Apr 09, 2009

    Using this for Word documents does not always work when it has been created on a Mac with Microsoft Word 2008. The error is:

    Any ideas?

    If I take the same doc and open it up in Word on Windows, re-post it, the macro works.

    1. Aug 11, 2009

      Hi Mark,

      Sorry if this comes in a little late - I stumbled across your comment just now. As far as I know, the macro does not support files created in Microsoft Word 2008 (Mac) yet. This might be related to WORDDV-101, too.

      Cheers,
      Azwandi

  13. Apr 22, 2009

    Anonymous

    Hi,

    Can the Viewfile macro be made compatible with office 2007? i.e the macro should accept the following types of files:

    .pptx

    .xlsx

    .docx

    Thanks!

    Shampa Dasgupta

    1. Apr 22, 2009

      Hi Shampa,

      The issue for tracking this improvement request is at CONF-12006.

      You can add yourself as a watcher on the issue to be notified of progress.

      Cheers,
      Mark

  14. Apr 26, 2009

    I'm running 2.8.2 and all staff had flash player 9 installed and the viewfile for powerpoint files was working fine.  Everyone in the company has been upgraded to flash player 10 and now the viewfile for powerpoint files is giving a blank screen.

    Is there a reason why its not working with Adobe Flash player 10?

    Thanks

  15. Apr 27, 2009

    I found uninstalled the office connector from the plugins repository and reinstalling it fixed the problem.

    1. May 07, 2009

      Hello Linden,

      I am not sure if these are related, but you might want to check them out:

      It might be probable that you were using older version of the Office Connector plugin. Then, re-installation has installed the latest version containing the fix.

      Cheers,
      Azwandi

  16. Apr 27, 2009

    Would it be possible to render the content of the file (Excel) as a wiki text whith links to the pages in confluence?

    Eg. I have a page called ABC. In the uploaded Excel I refer to the page ABC (by mens of plain text not by hyperlink). In viefile mode the link is not recognised.

    1. Jun 17, 2009

      Hi Krzysztof,

      Yes, you cant do that. Because the macro will only convert the content of your excel file to HTML directly without further processing in Confluence. Because the macro that you use in Confluence is actually a macro which needs Confluence's processing. While viewfile macro is macro outside Confluence core code. So, you need a complete URL address of the page so that you can click it.

      Cheers,

  17. May 01, 2009

    This is what we get in our environment when clicking on an excel spreadsheet name that is using the viewfile macro.

    Could not open 'http://confluence.atlassian.com/plugins/servlet/webdav/Global/DOC/Confluence Documentation Home/Confluence User Guide/Working with Macros/View Fiew Macro/my spreadsheet.xls'.

    Microsoft Office Excel cannot access the file 'http://confluence.atlassian.com/plugins/servlet/webdav/Global/DOC/Confluence Documentation Home/Confluence User Guide/Working with Macros/View Fiew Macro/my spreadsheet.xls'. There are serveral possible reasons:

    • The file name of path does not exist.
    • The file is being used by another program.
    • The workbook you are tryign to save has the same name as a currently open workbook.

    Has anyone else come across this issue? We can open the file if we go to the Attachments sections but not from the macro itself.

    1. Jun 17, 2009

      Hi Marten,

      Please raise a support ticket to https://support.atlassian.com, so that your problem can be investigated.

      Cheers,

    2. May 19, 2010

      Anonymous

      I have same problem, is there yet any solution. Our confluence version is 3.2

    3. Oct 27, 2010

      Anonymous

      This error occurs when the URL is too long or malformed for Excel or WebDav. I have not searched support to see if there is an issue there yet.

      Place the attached file higher up the page hierarchy and use the viewfile page parameter to locate it.

      This could possibly be resolved in the source by using the tiny URL instead of the full URL.

  18. May 03, 2009

    We played around with this macro using an Excel file and found that you risk overwriting each others work when 2 or more people change the Excel file at the same time.

    Is it possible to lock a file while it is beeing edited?

    If locking is not possible a warning sign that the file is beeing edited on the webpage containing the Office file would also be great.

    Thanks,

    Kris

    1. May 05, 2009

      Hi Kris,

      As far as i know, the feature requested is not available yet. You might want to
      raised a feature request in JIRA.

      Also, you might want to try the Attachment Checkout Plugin.
      Where this plugin might fullfill some of your requirement.

      Best rgds,
      Zed

      1. May 05, 2009

        Hi Zed, thanks for the reply but  concerning the Attachment Checkout Plugin, I read in the Known Issues that this macro is not compatible with the Viewfile macro  so i thought it makes no sense to use it but I will give it a try and see where we get.

        Best regards,

        Kris

  19. May 28, 2009

    Just started trying to us the viewfile macro, however we have hit two issues:

    • When prompted for a username and password, it does not take any of our username and passwords. We have LDAP integration with Active Directory. Is there something we are missing
    • If we :
      • attach a excel document (would be nice if it supported URL links)
      • reference it from the page using viewfile
      • then open the Spreadsheet change it i.e. delete a load of cells and save it to the hard disk
      • then delete the attachment and re-upload, the Spreadsheet rendering on the Wiki page does not change. I tried purging the attachment cache but this did not help

    Again are we missing something?

    1. Aug 11, 2009

      Hi Michael,

      Judging by your description, I would suggest you to raise a support ticket in case the problem remains unresolved.

      Cheers,
      Azwandi

  20. Jun 05, 2009

    I am getting the error message " Error formatting macro: viewfile: java.lang.NullPointerException" when clicking the "view" link on the attachment page. Did anyone else have the same issue? Thanks.

  21. Jun 15, 2009

    Anonymous

    why can't i change height on word documents like i can do for powerpoint ?

    1. Jun 23, 2009

      Hi,

      As far as I know, the height parameter only apply to view Powerpoint and PDF. You might want to
      raise an improvement request on this issue in JIRA:

      In the mean time, I have mere suggestion. You might want to try to use the HTML macro to control the height of the word
      document.

      I have created an example shown below, hopefully this will give you some idea on it:

      Hope that helps.
      Best rgds,
      Zed

  22. Jun 16, 2009

    I've found a bit of an issue with numbering being thrown out when using the viewfile macro with word documents.
    If I have a word document with the following headings:

    ------------------------------

    1.  Heading one
               (a) Heading two
               (b) Heading three
    2.  Heading four
               (a) Heading five

    -------------------------------------
    It shows this
    ---------------------------------------

    1.  Heading one
               (a) Heading two
               (b) Heading three
    2.  Heading four
               (c) Heading five

    1. Jun 22, 2009

      Hi Linden,

      Unfortunately, I was not able to reproduce this locally on a Confluence 3.0 and 2.10.3 instance. You might want to check that the numbering in the Word document is correct (try closing and reopening it in Word).

      Cheers,
      Azwandi

      1. Jun 24, 2009

        Hi Azwandi

        I've tried this with several documents and get the same result each time.

        We use customised heading styles, which is what I think may be causing the problem.

        It would be good to give you one of the documents that's it happening with, but there's no option to attach files.

        Linden

        1. Aug 12, 2009

          Hi Linden,

          Sorry if this is a little too late. However, if the problem remains unresolved, feel free to raise a support ticket for further investigation. In the meantime, I would suggest you to temporarily disable the customisation and see if the problem persists.

          Cheers,
          Azwandi

  23. Jun 23, 2009

    Anonymous

    I want the wiki to display a word document attached to the page.  I attached the document and typed:

    Error rendering macro 'viewdoc' : The viewfile macro is unable to locate the attachment "rounds_visdev_5.11.09.doc" on this page

    However, I get this display:

    What am I doing wrong?  Or is there another macro command for displaying an attached document?

    1. Jun 24, 2009

      Hi,

      Please raise a support ticket to https://support.atlassian.com, so that your issue can be further investigated. Also provide the following:

      1. Wiki markup used for the above issue
      2. Word processor that you used and the version
      3. A sample of a word document that can reproduce the issue
      4. The exact error that you receive when you used the viewdoc macro
      5. A copy of your Confluence log files located at <confluence-home>/logs/atlassian-confluence.log
      6. A saved copy of System Info via Administration -> System Information

      Cheers,
      JSashi

  24. Jul 20, 2009

    Hello,

    Is there a way to prevent the download option from being shown when using the viewpdf

    macro? Or is there some other way to display a PDF in a non-downloadable format?

    Thank you,

    MJ

    1. Nov 07, 2010

      Did you meanwhile found a solution or workaround?

      I tends to be that setting view permissions is the only way to avoid content being downloaded from non trusted viewers.

      Cheers.

  25. Jul 21, 2009

    I am using Adobe Pro v9, and none of the pdf's I am creating display with the viewfile macro (confluence 2.9). Any clues? Should we reboot the server, re-install plug-in?

    Help needed

    1. Jul 28, 2009

      Hi Guillermo,

      I'd suggest you to test the plugin with a PDF which is not created by Adobe Pro v9. Perhaps, you can try exporting this page to PDF and use it in your instance. If that works, there must be something wrong with the PDF you have created. Otherwise, please check that your browser can actually display Flash files.

      Cheers,
      Azwan

  26. Aug 05, 2009

    Anonymous

    I am using viewfile for displaying a excel files.  For the most part the feature works as expected.  However, I have two problems.

    1) Excel graphs are not displaying at all.

    2) When I hide rows and columns in Excel the columns are hidden correctly in Confluence.  However the rows that are hidden in Excel are displayed in Confluence.

    Any suggestions on how to resolve these would be appreciated!

    Thanks,

    Chuck

    1. Aug 12, 2009

      Hi Chuck,

      I am not able to reproduce your first problem. Excel graphs are displaying properly in Confluence. I would suggest you to raise a support ticket to https://support.atlassian.com, so that your issue can be further investigated. Also provide the following:

      1. Wiki markup used for the problem
      2. Word processor that you used and the version
      3. A sample of an Excel file that can reproduce the issue
      4. A copy of your Confluence log files located at <confluence-home>/logs/atlassian-confluence.log
      5. The system information page. You can obtain the page by accessing the http://<path-to-confluence>/500page.jsp

      As for your second issue, I could not even hide the columns in my instance. I would suggest you to raise a new feature request at http://jira.atlassian.com as for this issue.

      Cheers
      JSashi

      1. Aug 17, 2009

        Anonymous

        Jsashi,

        Thank you for your reply.  I just confirmed that I can in fact hide columns but not rows.  I will enter a Jira ticket on this.

        As for the graph display, I did some more experimenting.  As long as the charts are on the same tab as the data used to generate them, they display.  If the charts on a different tab and I reference the tab with the charts on them, they are not displayed.

        Thanks again,

        Chuck

        1. Aug 18, 2009

          Hi Chuck,

          I notice that you have raised a support ticket regarding this issue. We will get back to you as soon as we can. Kindly follow up from the support ticket.

          Cheers
          JSashi

  27. Sep 09, 2009

    Anonymous

    Hi, I would like to just list the attachments using viewfile, rather than viewing them. 

    Viewfile creates a link that opens the file via webdav in word/excel/ppt etc.  This "link" is all I want to list.  T

    his seems like the best place to request this since viewfile leverages the document object calls correctly in both FF and IE.

    Error rendering macro 'viewfile' : The viewfile macro is unable to locate the attachment "MyDoc.doc" on this page

    "Click to Edit in Word The Attached File: MyDoc.doc"

    1. Oct 30, 2009

      Hi,

      I absolutely agree with that. This is a feature I am missing as well. Editing documents using the viewfile's webdav launcher is so much easier compared to the conventional way, which is like: open an attachment, save a copy to disk, edit the doc, and finally upload it again as attachment.

      Is there any other way to open documents via webdav from within Confluence?

      Thanks,

      Martin

      1. Aug 19, 2011

        Hi guys,

        I believe that this feature is being addressed in our current beta release of 3.1. You can try it on this instance; visit the Attachments of this page and you should see there is a direct link to edit Office documents. You can use the {attachments} macro in case you would like to display the list in a Confluence page.

        Hope that helps.

        Cheers,
        Azwandi

        1. Nov 23, 2009

          Hi Azwandi,

          that sounds exactly like what I was looking for. I'll give it a try as soon as I have upgraded to 3.1

          Thanks a lot.

          Martin

  28. Nov 02, 2009

    Anonymous

    Can i use this with Version: 2.2.3

    1. Nov 10, 2009

      Hi,
      Unfortunately, this plugin is not supported in Confluence 2.2.3. You can refer to Office Connector Product Compatibility to check it's compatibility.

      Meanwhile, confluence 2.2.3 had reached it's end of support life. Are you interested in doing an upgrade? (smile)

      Cheers,

  29. Nov 03, 2009

    Anonymous

    When using viewfile to view a word document, I am losing some formatting. 

    1. Extra spaces used for precise formatting are removed thereby messing up the formatting of the data.  Tabs do work, but because of the nature of what we are doing, are difficult to set up.
    2. text highlighting is not being displayed.

    Any suggestions?

    1. Nov 09, 2009

      Hi,

      For 1, the reason why it seems to have stripped the extra spaces is due to HTML treating multiple spaces as one. You can edit the same document and you will realise the formatting will still be retained in the Word Processor. As a workaround, you might want to use a hidden table (table without borders) to format your data.

      As for the text highlighting, I guess this is a limitation of the Office Connector plugin. Feel free to raise a feature request at http://jira.atlassian.com. and describe in detail how you require this feature to work. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

      Cheers
      JSashi

      1. Nov 07, 2010

        Above comments are aged but almost have actuality because this is something my clients often claim to not work properly.

        From my knowledge of using word docs in confluence: a correctly formatted word doc using the standard formatting features of Office Word, or Neo Office with same fonts installed on clients and servers tends to display a appropriate formatted and useable doc in conflunece.

        People often edit in word manually instead of using standard formatting features form word processors – most common – use "spacebar" and "return" to position spaces between words and text of blocks. Result on confluence page will be messed up since as you described all those created "spaces" between e.g. textblocks in Office Word are commands that will be handled as one command and so on.

        Use standard word formatting features in word processors to achive very good (but not perfect) results in confluence using viewfile.

        Take care that fonts used in word docs and not available in confluence will be exchanged to those available by confluence default settings. So Fonts need to be installed on the confluence server to match font’s used in docs.

        As custom or default CSS do influence how content will be displayed a space admin maybe need to arrange it all on a custom way that appearance matches closely.

        If you received bad formatted doc. and have no time to format it in a correct manner – do a PDF printout and display this and just place the word doc as an attachement.

        Cheers. 

  30. Dec 16, 2009

    Hi,

    I was wondering if it's possible to hide the contents of a document when using the viewfile macro, and just display the link that allows you to edit the file.

    Thanks,

    Chris

    1. Dec 17, 2009

      I haven't come across a case where my users want to do this. Won't the users view the file when they are editing the file anyway? Can you explain? Edit what file? Word, Excel, PDF?

      This might help: http://confluence.atlassian.com/display/DOC/Edit+in+Word+Link+Macro

      1. Dec 17, 2009

        Anonymous

        Hi Royce,

        They would like to have the link to edit the document, but not display the content on the page itself. (Word, or Excel)
        I was just wondering if it was possible.

        Thank you for the link, I will take a look.

        Chris

  31. Dec 17, 2009

    The viewfile macro uses the temp directory: <confluence_home>/viewfile. I am an admin, can I delete files in that directory directly? Any affect on Confluence indexing and such?

    1. Dec 22, 2009

      I deleted files older than 30 days in viewfile dir., no problem.

      # cd <confluence_home>/viewfile/
      # find . -mtime +30 -exec ls -lst {} \; | more
      # find . -mtime +30 -exec rm {} \;
      
  32. Dec 23, 2009

    Hi,

    Is it possible to connect JIRA from Excel using macros.

    Please advise me if there are any resources available for me to read and try out this.

    thanks,

    Kulls

    1. Jan 12, 2010

      Hi Kulls,
      The {viewxls:} will render whatever content in your excel file. In other words, if you wish to have links that link back to JIRA issues, you must provide the link in your excel file, for example:

      1. You can export your JIRA search result to Microsoft Excel, the issue key in search result will contain a link to corresponding JIRA issue (if you are using Confluence 3.1, make sure the excel file is in 2007 format by re-opening and re-saving the excel file into .xlsx format)
      2. Upload the excel file to desire page, render it with {viewxls:name=file_name.xlsx} macro
      3. By now, you should be able to see a page with JIRA links

      Hope my suggestions would help.

      Regards,
      Jack

      1. Jan 15, 2010

        Is there any way to do this with internal Confluence links (such as [childpage]) or do they have to be fully qualified?

        1. Jan 19, 2010

          Hi Mike,
          The links need to be provided in the excel file. I'm afraid we can't link them via internal Confluence links.

          Hope my explanations would have cleared your doubts.

          Regards,
          Jack

  33. Dec 30, 2009

    We just upgraded from Confluence 2.92 to 3.02 and for some reason the viewfile plug-in is no longer working for new pages.  I tried the

    Error rendering macro 'viewfile' : No attachment name specified
    macro as well as the
    Error rendering macro 'viewxls' : No attachment name specified
    macro and nothing will show up.  Anyone else have this problem?

    1. Dec 31, 2009

      Hi Sally,

      Please raise a support ticket to https://support.atlassian.com, so that your issue can be further investigated. Also provide the following:

      1. Wiki markup used for the above issue
      2. Word processor that you used and the version
      3. A sample of a document that can reproduce the issue
      4. The exact error that you receive when you used the viewxls macro
      5. A copy of your Confluence log file located at <confluence-home>/logs/atlassian-confluence.log
      6. The system information page. You can obtain the page by accessing the http://<path-to-confluence>/500page.jsp
      7. A screenshot of Dashboard > Administration > Plugins > Office Connector plugin
      8. Screenshots that illustrate the problem.

      Cheers
      JSashi

      1. Jan 20, 2010

        Anonymous

        Will do, thanks!

      2. May 18, 2010

        Hi

        Seem to have the same issue - v3.2.1_01 evaluation.

        WEBDAV enabled, Office connector enabled. Flash v10 installed and checked.  Files attached to the page.  When I add in viewxls (44 lines and 14 columns) I get one blank row.  The edit document button brings up the correct xls for editing, but nothing dispays on the page. Same result with powerpoint, get a blank square with nothing displaying.

        Any ideas?

        Mike

        1. Sep 03, 2010

          I had that same issue and found that by going into Admin settings and WebDAV configuration you can then check the box next to "Disable strict path check" That seemed to fix it for me.

          1. Sep 09, 2010

            Thanks for sharing that out, Michael. However, if that did not fix the issue for others, please follow my suggestion earlier

            Cheers
            JSashi

  34. Feb 03, 2010

    Hi

    Would it be possible to document a small note in the Viewfile macro section for displaying word documents. This note will be to indicate to the user that the fonts from the word document recognized by confluence are displayed as is, however if the word document contains a font that confluence does not recognize, then it will display it using the default font of the confluence page if there is such a notion.

    Thank you

    Cheers
    Lumina

    1. Feb 17, 2010

      Hi Lumina,

      I am using the view file macro to display my word attachment on my confluence page. The problem I have is that when the word document is displayed on the confluence page, it is not showing the same font as the document. The font used in the word document is Arial, and the confluence is displaying the material as Times New Roman. Is there a way to change this?

      I am referring to your previous query above. I believe you are encountering the same issue as documented in our KB. If this is true, you may want to try the resolution as suggested in the KB.

      As for the note, you may want to use the {note} macro.

      Hope this helps.

      Cheers
      JSashi

      1. Apr 29, 2010

        Thanks J Sashi.

  35. Feb 19, 2010

    We are trying to use this plugin to view pdf files in our installation on Confluence 3.0. 

    The plugin works, but its unbearably slow when using Internet Explorer 7.   At times the browser will freeze for 10+ seconds until the pdf loads.  Using IE6 the plugin is very snappy and returns the pdf quickly. While not as fast as IE6, using Firefox works as well but is a tad slow.  I am currently running Flash Version 10,0,32,18. 

    Are there any known issues with this combination of Flash, IE7 & Confluence 3.0?  Any suggestions on how to debug this would be appreciated.

    1. Feb 19, 2010

      For displaying pdf's, I created a simpe macro in Confluence, that uses html, to embed the pdf in the page. Because it uses the adobe plugin for MSIE , it brings up the Adobe wrapper or frame, has all the adobe functionality, and it looks a better. Often times (viewfile) would not work 100% with pdfs sourced from different applications.

      other advantage of the macro, is that I can embed pdf that are in sharepoint or shared drives, not just inserted in the same wiki page. The macro also shows a link below the pdf frame, pointing to the source file, so the user can open the file in a new window.

      the html code i am using, you can download from the internet, tons of sites.

  36. Mar 15, 2010

    I see that there have been previous posts about the poor quality of the file when using viewfile on a PDF file. That post sorted out one of my concerns regarding the use of this macro on that particular file type. However, since we updated to Confluence 3.1.1, I notice that there is an issue with the formatting of the text in the display of a PDF when using the viewfile macro. The most common error is that all text is converted to italic and the document is repaginated. The files were displayed correctly in the previous version of Confluence, 2.10.3. Any thoughts on this? Has anyone else noticed this behaviour?

    We also have examples of PDF files that are not displayed at all when using viewfile, as well as files where all text is illegible because all characters are shown as squares. Font problem one might think, but the original PDF file looks OK. Any thoughts on this?

    Best regards,

    Lars

    1. Mar 15, 2010

      I got tired of the viewfile macro, and created my own to display PDF's using common html embed code downloaded from the internet.

      it displays the PDF's using the adobe plugin, which is 100 times superior. And it works with files stored in any web location, not just the present wiki page.

      hope this helps

      1. May 11, 2010

        Guillermo,

        Any chance you could share that with us?

        1. May 11, 2010

          For this to work, your browser needs to have the Adobe plug-ins installed, I guess.

          You need to be a Confluence Admin. I assume you know where "User Macros" is.

          Give the macro a short easy to remember but unique name. Toggle on "Macro has a body".

          Select "Macro generates wiki markup"

          In Template, put

          (the macro will also create a link below the viwer, to open the document in a new window)

          When you use this macro, you only need to add the URL where the PDF is stored. This works very well with Confluence attachments and SharePoint files. The URL can't have spaces . Replace spaces with "%20"

          We have a version of the macro that creates a "portrait" viewer, and a landscape viewer. You just need toadjust the dimensions in the macro to the size you need.

          Tell me if it works. Hope it does. (smile)

          1. May 11, 2010

            Thanks. That works great!

            1. May 12, 2010

              sorry I ommited telling how to use it... you already figured out? (YES)

              for others... it's easy

              where:

              ENJOY

  37. Mar 23, 2010

    I suggest Confluence team to use and borrow idea from the web PDF previewer that Alfresco Share uses (open source so Confluence devs are able to see the code).

    I've opened also a JIRA to show the big difference between the two previewers, all web based.

    See:

    http://jira.atlassian.com/browse/CONF-19115

  38. Apr 29, 2010

    Hello,

    I am trying to use this macro to display a fairly large spreadsheet on the Confluence page. The result is a huge webpage in which the user can see only the smallest upper left corner of the entire spreadsheet. "height=" and "width=" don't work, and neither does saving the spreadsheet at, say 25%. Is there a way to define a zoom or control the size of the spreadsheet when it's displayed?

    1. May 17, 2010

      Hi Rian,

      I am afraid that there is no such an option. Perhaps, you can try separating the sheet into multiple sheets, and use the sheet parameter to display them selectively? Anyway, if you are keen on this, feel free to raise a feature request in our issue tracker.

      1. Nov 05, 2010

        I'm unable to show two sheets from the same excel document on a single wiki page. 

        I'm using two instances for the ViewXLS Macro on the same Wiki Page.  Each instance points to the same document, but a different sheet.  Unfortunately both instances of the macro shows the sheet parameter defined in the first instance of the macro.  Is this a known behavior?  Are there plans to make this possible?

        Thanks

  39. May 26, 2010

    Anonymous

    I'm using the viewfile macro for my xlsx document.  Does text highlighting work with this macro?  I cannot seem to get it to work for myself.

    eg.  excel text (with-in a cell) looks like this: Build first building in lower manhattan. - Done - Completed Sprint 1

           confluence texts appears:  Build first building in lower manhattan. - Done - Completed Sprint 1

  40. Jun 04, 2010

    Hi there!

    I am just wondering - I understand for the Excel files that you have to put sheet=name for each sheet you want displayed and I assume this means an individual line for each sheet, such as:

    viewxls:name=excel1.xls|sheet=name1

    viewxls:name=excel1.xls|sheet=name2

    viewxls:name=excel1.xls|sheet=name3 ,etc...

    Is there no way to make it display all of the tabs for each sheet so that you can switch between?

    Thanks!  :)

    1. Jun 08, 2010

      Hi Kristin,

      As far as I know, the feature requested is not available yet. Feel free to launch an improvement request in JIRA:

      Cheers,
      Zed

      1. Jun 22, 2010

        Thank you! :)

  41. Jun 15, 2010

    Anonymous

    Hello,

    I would like to hide the EditDocument Button like the first image on the "exemple of usage" part.

    We have desactivated webdav and editinword action button, but still this button shows up beside files that use the viewxls or viewdoc macro...

    can anybody helps me to get rid of this button?

    Thanks for your help.

    Michael

    1. Jun 16, 2010

      Hi Micheal,

      I have raised an improvement request on this previously:

      Please add yourself as a watcher, vote for this improvement and add your own comments to this request. For further details on how we include new features and improvements, you might want to read this page.

      As a workaround, you can try the suggestion here. Hope this helps.

      Cheers
      JSashi

  42. Jul 13, 2010

    Anonymous

    When displaying Excel the format of my date are coming through in US format(mm/dd/yy), where I require them in AU format(dd/mm/yy).

    They display correctly when in excel by default but not in confluence.

    Any suggestions welcomed.

    Cheers,

    Andy

    1. Jul 26, 2010

      Hi Andy,

      Unfortunately, I can't seem to reproduce this problem in my local instance. Feel free to raise a support ticket at https://support.atlassian.com for further investigation. You might want to attach an example of Excel files to the ticket.

      However, I have a mere suggestion. I believe you will need to set the date format to be in AU format in the Excel itself. Failing that, you might want to change the Time and Date Format in the General Configuration. Please refer to this page for more details.

      Cheers,
      Husein

  43. Jul 22, 2010

    Hello,

    I've added a lot of documents with this macro and it has worked fine so far. I'm wondering if there is a way for Confluence to save old versions of embedded documents once they've been edited.   I know that confluence saves versions of changes made to text but will it save versions of word docs edited? If you have any solutions please let me know!!

    Thanks,

    Catherine

    1. Nov 07, 2010

      If you use edit mode to directly edit a document in word, than the attached word doc will be downloaded, send to word, you do your edit and it will be resend to confluence as attachment. If you look at your attachments you should see al previous versions.

      See user guide: Editing Office Documents

      1. Jul 26, 2010

        That's not quite what I meant... The documents in my pages have been added as attachments and then embedded into the wiki pages using the view file macro.  So each wiki page has the view file macro in the wiki markup, not the actual text of the document. Is there anyway to save changes made to the document?

        Thanks,

        Catherine

        1. Jul 26, 2010

          I guess you mean with "save changes to the document" the attached word document. You cant save changes to the word document, but you can attache the changed document again. You have two options to edit a page. One is just "edit", which will edit the content inside a page. And one is called "edit document" Which will download an attached word document, to be edited localy and automatically resend as a new attachment into confluence. See: Editing an Office Document from Confluence. If you dont see "Edit Document" Office Connector might be disabled.

          If this is not that what you are talking about, someone else might understand and help you.

  44. Aug 10, 2010

    Anonymous

    I attached a word doc in a page say X and X.doc (Word doc).

    I want to display the specific sections of the X. doc (word doc) in another page called Y. How to perform this? I tried many ways and i couldnt.

    Please could you explain whether it is possible in confluence?

    1. Aug 20, 2010

      Hi,

      I am afraid that this feature is currently not available. Feel free to raise a feature request at http://jira.atlassian.com and describe in detail how you require this feature to work.

      Cheers,
      Husein

  45. Oct 13, 2010

    Anonymous


    Is there any way to display the menus on top of the view file macro?

    Please let me know.

    Thanks, 

    tkeegan@qbp.com

    1. Nov 25, 2010

      This could be solved if your computer is updated to the latest browser software available with all its updated plugins you might have installed. It has something to do that graphics do not get handled right if FlashPlayer is installed and if you run Firefox on Mac. With Firefox on Windows Vista you get at least some minor graphical errors. I did reported this to Firefox.

  46. Nov 04, 2010

    I am not a Wiki Mark Up user yet.  I am a Mac user having trouble using Macros to embed documents.  I have downloaded the Office Connector as well as NeoOffice and WebDAV Launcher and am not able to effectively upload documents and edit them on the wiki.  I have double checked the versions, am I missing something?  Help!

  47. Nov 07, 2010

    I can just tell that with confluence 3.4 and Firefox 3.6.11 and Neo Office 3.1.2 Patch 1 it works on actual intel macs until that point, that you want to save a doc back to confluence which does not seem to work or not known how to do it. I did test it today by accident and you can take a look at following issue: Neo Office edit and safe back to confluence.

    Current workarounds are to save locally and upload it again as an attachement or to use Parallels, XP, Vista or Windows 7 with Firefox installed on a mac.

    Cheers

  48. Nov 15, 2010

    Please see this latest update comment - to address some of the negative comments in this thread. Hope it helps. Try it out.

  49. Dec 22, 2010

    When using the viewxls macro to embed an Excel spreadsheet in a Confluence page, any indents / indentations at the beginning of a cell (created using the "Increase Indent" / "Decrease Indent" buttons in the Excel toolbar) are not displayed. 

    As a consequence, a column of values in an Excel sheet that represent a hierarchy (with the structure of the hierarchy being defined by the indent level of each value) end up looking like just a flat list when viewed in a Confluence page. 

    Is there any fix or workaround for this behavior?  I considered using leading space characters rather than the indent feature of Excel in my worksheet, but that would make the worksheet itself a lot harder to maintain.  (For example, I would be unable to select many cells and indent/unindent them all at the same time -- e.g. when adding a new level to the hierarchy.)  Thanks in advance for any advice!

    1. Jan 18, 2011

      Any suggestions? My organization is unfortunately still being impacted by this issue.

      1. Jan 19, 2011

        I have just an workaround for you – export your Excel diagram to pdf and attach excel sheet as doc and embed PDF instead.

        By the way Excel is not the best tool to generate an organizational diagram. I use OmniGraffelPro for this job but you could use also FreeMind with free-mind-map-macroGliffy or other. A lot of tools for diagrams support Visio and you could export diagrams to Visio format and use Visio plugin to display them.

        1. Jan 21, 2011

          Klaus, thanks for the suggestion! However, the reason I was interested in the viewxls macro in particular is the ease of editing that it affords: one click (on the "Edit Document" button) to open the spreadsheet for editing in Excel, and the Excel file automatically gets updated on the Confluence page when saved by the user.

          My requirement is also specifically for a spreadsheet (rather than a mind map or other format); this particular spreadsheet just happens to have one column where the data needs to be visually represented hierarchically (via indenting cells that are at lower levels of the hierarchy).

          I'm open to further suggestions!

          1. Jan 22, 2011

            Confluence MS-Office integration is some kind of basic implementation and not the best for presentation of documents generated with MS-Office. I thought that you wanted to use an organizational diagram but if you want to do something else you might want to create a thread at the confluence forum to get an answer for your specific question.

  50. May 25, 2011

    Anonymous

    Hi,

    I want to attach a bigger pdf-File. Is there any possibility to point to a single page for example Page 55?

    Thanks

    1. May 26, 2011

      you could do this if you have adobe or any other pdf plug-in installed in your browser that provides this functionality and use a user-pdf-macro which is mentioned a few times on this page or you invest a few bucks and use SharpView to get this ability.

      If you just right click on a pdf link an use "view pdf in another window" it should activate your pdf browser plug-in in use anyway so that "jump to page No." function should be activated.

      Most plugins needs to download whole pdf to be viewed to that computer that starts a view. Large pdf files should be avoided because they will always get downloaded – time consumption job – each time you call up a page and click on view. Maybe SharpView dont have this issue because they seem to render the pdf on the server.

      Whatever you manage to be viewable could be downloaded too – check your security requirements too.

      1. May 26, 2011

        Anonymous

        Thanks, I will try SharpView.

  51. May 26, 2011

    Anonymous

    Hi All,

    how can i specify a wildcard for the file name or tell the makro to show the 1st attachment of the current page?

    cheers!

    Mat

  52. Jun 12, 2011

    Hi,

    Is there any option on Excel macro to display more than 1 sheet? In my worksheet test.xls, I have 3 sheets(sheet1, sheet2, sheet3) and I would to display all 3 sheet so user can click on sheet and see data from whatever sheet he/she selected.

    Please let me know if there is any way to achieve this.

  53. Jul 13, 2011

    Anonymous

    we just upgraded to confluence 3.5 and are running office 2010. When we try to edit an excel spreadsheet it doesn't open the document. Tried it with office 2003 and it works there. Is there a way to get it to work with 2010? this what we are trying to use.

    Error rendering macro 'viewxls' : The viewfile macro is unable to locate the attachment "Shipout ready assets1.xls" on this page

    thanks

    Rayone

  54. Aug 11, 2011

    Hi,

    what about xlsm-Files (Excel 2007/2010 with Macro)? Knows anyone if these extension is scheduled or is this a no-go?

    Thanks,

    Markus

  55. Aug 22, 2011

    Anonymous

    We currently have Confluence 3.3. We have a number of visio documents that have been converted to PDF that we're attempting to display using the viewpdf macro. All we get in the PDF viewer is a white screen area with a grey box where one of the items in the workflow displayed on the PDF is located. When we try printing an email to PDF and using the macro, it displays fine, however displaying a PDF with images doesn't seem to work.

    We have the latest version of Adobe reader and Flash Player, and have tried this on IE9 and Chrome with the same results. In addition, we have tried a couple different file naming conventions (spaces, no spaces, all lowercase) with no effect. Any idea on why we can't get this to display correctly?

    Steve

  56. Aug 30, 2011

    We just upgraded from Confluence version 2.5.6 to version 3.4.9 and I can no longer use

    excel:url=[file://remoteDFSserver/myfilestore/files/myfile.xls]|sheet=1|formatCell=true

    I want to be able to display a dynamic file that is updated daily with a script. Any idea how to do this in the new version? I tried to use the view file macro viewxls but this seems to require the file to be attached. The file I want to display is an excel file that list server software versions on a group of servers and is updated daily.

    1. Jan 19, 2012

      Anonymous

      Hi,

      Same issue, created CONF-24454.

  57. Sep 22, 2011

    Anonymous

    When I'm embedding an Excel file that has hyperlinks, they hyperlinks are expanded and viewable on the page. How do I change it so that the hyperlinks are displayed through the assigned words?

  58. Dec 07, 2011

    Anonymous

    when I upload a word document to confluence and display it on a page by using the following macro

    {viewdoc:name=Testing_Design.docx}

     the document was uploaded successfully but I cant view the images on the page.

     

    Can you please suggest a solution to this.?

  59. Jan 13, 2012

    Anonymous

    Hi, we have problems to import a word document by using the macro to Wiki.

    Although we had the right file name and the right positipn of the file...we got following answer:

    the viewfile macro is unable to locate the attachment "DOK1 on this page

  60. Jan 25, 2012

    Anonymous

     

    Try to write macro in Excel and upload the file to url via HTTP. Det doesn't work. Why ?

    Any link for explaining this or how to solve the problem ?

    Thanks in advance