Microsoft Open XML unsaved file - excel

Is it possible, through VBA, to get the Open XML definition of the current, unsaved workbook (without saving it)?
Carlos

For playing around with xml files in Excel I've been using the free tool Custom UI Editor for Microsoft Office. I've been using this to customise the ribbon in Excel. The tool looks very simple:
An example of a customization looks like this:
Pretty sure I downloaded the tool from here:
http://openxmldeveloper.org/

Related

How to open .xlsx files in MS Excel from VS Code?

Is there a way to open certain files like xlsx/docx in external apps (preferably system defaults) from VS Code Explorer instead of just opening another tab in VS Code?
I want to be able to open xlsx/docx etc. in MS Office Apps by double clicking from the explorer, if that's possible at all.
After installing the extension called open, you can open ms files by default app with right click. (But it does not work in WSL)
Check this extension - both .docx and .xlsx are working good and you can even edit them.
Example of .docx:
Example of .xlsx:
If you want to open .xlsx files within vs code then this tool does the job. It is much faster then loading Excel I find.
Excel Viewer

Open Excel file inside Visual Studio

I need to open an Excel file for editing included in a Visual Basic project
I'm able to open it using Excel application. The file is opened in an external Excel instance.
Is there an extension that allows to open Excel files inside Visual Studio as other documents?
Update: I'm searching something similar to Excel Viewer but I need an extension for Visual Studio (not Code) and I need an editor to modify the content of Excel files. I think that the extension has to do something similar to How to Integrate Excel in a Windows Form Application using the WebBrowser.
Maybe you could try to modify the Excel file as a csv file instead, depending on how complex you file is (if it contains formulas it will not work). I have tried using csv before and I did not notice much difference between csv and excel files when I was using it and csv could easily get data, but if you need formulas, you may have to compute them in your code before editing the file.
I believe you can just right click on the file and select Open With > Visual Studio. Or within Visual Studio go to the Menu Bar and select File > Open and seect the file. Hope this helps!

Add-in adds button to Home without code?

I have downloaded a simple XLAM add-in (I think it's from Microsoft) to remove all non native styles from the active workbook.
This add-in adds a Remove Styles button next to Home/Styles.
However, I looked at the code in the add-in and I can't find any trace of code to add/remove this button.
Can someone explain how to do this magic trick ?
CustomUI elements are xml code that lives in the workbook. There are couple of ways you can see this.
Download the Custom UI Editor for Microsoft Office
Download the Ribbon editor from YourSumBuddy
Change the name of the file to RemoveSytles.zip (all Excel docs are really just compressed file). Open the zip file and navigate to the customUI folder. Open customUI.xml in your favorite text editor.

Sharing custom macros and custom Excel Ribbon with others via Sharepoint

My colleagues and I use Excel 2013 and Sharepoint
I have written some custom macros which I have stored in Personal.xlsb
I have also customized the ribbon to add a tab to access these macros.
What is the best way of sharing these macros and the ribbon with my colleagues? (and keeping them updated)
One way is as follows (and this needs to be done each time there is a change)
right-click Ribbon | Customize the Ribbon | Import/Export | Export all Customizations and send this XML file to my colleagues and ask them to import it
Send my colleagues my Personal.xlsb and ask them to overwrite their own with this.
However is there a better way - involving manual effort on the part of my colleagues as little as possible.
I thought perhaps of saving the macros as a sharepoint document, and then editing the XML document to point to this sharepoint document.
The best answer that I have come up with is as follows:
Not to save the files in personal.xlb but to save them in an AddIn (an .xlam file)
To add the menus to the Addin via Custom UI Editor For Microsoft Office (downloadable from http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/07/7293.aspx)
To save the file in the "Shared With Everyone" folder of "SkyDrive Pro"
To send a link to the file to my colleagues
This seems to solve all the issues. If I do an update then it seems that if my colleagues restart their computer then the addin is updated automatically.

Creating an .exe file from an excel spreadsheet

Can a standalone .exe be created from an excel file which has a few forms and macros?
Standalone as in "the user doesn't have to have Excel installed"? No. It's still an Excel file; it needs Excel to be available to run it.
You may be able to get away with the Excel viewer though. Worth a try, if you're worried about licensing costs. It won't let you edit data though, which may well include forms... you'd have to try it to be sure.
Maybe an Excel viewer would be an option? I'm not sure how much support there would be for macros, etc.
SpreadsheetGear for .NET includes a Windows Forms control into which you can load an Excel workbook. The Excel workbook becomes part of the Windows Forms application (it is embedded in the .exe).
The bad news is that SpreadsheetGear will not execute your macros so you will have to rewrite them to the SpreadsheetGear API. The good news is that the SpreadsheetGear API is very similar to the Excel API.
Disclaimer: I own SpreadsheetGear LLC

Resources