none
No buttons working when opening generated OpenXML workbook RRS feed

  • Question

  • Hi,

    I've looked around for the answer to this, but have been unable to get anything, so probably looking in the wrong places.

    I generate OpenXML worksheets as reports, and some may have stylesheets applied to match the source content defined, or contain charts.

    Now the problem is that, while I get the XLSX file generated correctly with all content required, when opening the file in Excel, no menus or buttons are clickableat all - they are not disabled, they are just not clickable. This is the case whether or not I apply a style sheet.

    using OpenXML SDK 2.5, Excel 2010

    thanks

    francois

    Wednesday, March 11, 2015 12:01 PM

All replies

  • Just notices something. If I manually resize the main Excel application just a bit, the buttons all get enables as they should be. So there must be a way to refresh the app?
    Wednesday, March 11, 2015 3:21 PM
  • Hi Francois

    Could you please be more specific about "menus and buttons"? Do you mean the commands in the Ribbon?

    Are you customizing the Ribbon at all?

    When you generate the workbook, do you start from scratch or do you use an existing workbook and modify it?

    I can't recall having ever heard about anything like this... Have you tried opening on more than one machine? Could you upload and Share a sample file on OneDrive or something similar and post a link so that we can look at such a file?


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, March 11, 2015 5:35 PM
    Moderator
  • Hi,

    sure, I'll upload a sample in the morning. Is it possible to upload xlsx files here themselves?

    Pretty sure you haven't heard about this before because I might be missing something obvious.

    When I open up the newly generated excel workbook, everything loads up fine. However, it seems as though the click events do not fire on any of the ribbon buttons or menus, as none of them fire at all. In fact, the only click event that does work is to add a new sheet.

    If I make a change to the sheet, then close it (red x), it asks to save. Re-opening that then is fine, everything working.

    I generate the xlsx from scratch, but noticed the document app and core properties were missing, so I took the original I generated, and compared with the changed one (as above), and added the missing bits(docProps/app.xml and docProps/core.xml) in my generation, but to no avail. Even if my newly generate file is the same as the working one, still doesn't work.

    But strangely, when resizing the app seems to reset the handlers and everything is fine.

    thanks


    Wednesday, March 11, 2015 9:11 PM
  • Hi François

    I'm afraid it's not possible to attach files to forum posts. OneDrive or something similar, where someone who's not a member is not required to log-in or sign up, is usually best.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, March 12, 2015 7:20 PM
    Moderator