Inserting OMML formulas into Excel sheet via office.js - excel

Is it possible to add a mathematical formula (not an Excel equation) of OMML type into an Excel sheet via office.js? I know you can add them manually by using "Insert" / "Equation" ("Equation" just below "Symbol"), which results in an OMML formula (an <m:oMath> element in the Excel sheet XML source).

Thanks Stefan,
Unfortunately, Office JS Excel API currently doesn't support OMML type. Therefore, I would suggest that you could submit the request and upvote this request at uservoice. https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback?category_id=163563

Related

Client has Excel 2019, I have Excel 365. Dropdowns of spilled arrays don't work for client

The spreadsheet I've created has multiple dependent dropdowns that reference spilled arrays. Specifically, the dropdowns reference a cells that each use Filter() and Sort().
The client has Excel 2019 and reports that the dropdowns don't function. I've made sure that In-cell Dropdown is selected in Validation. I've ensured File>Options>Advanced>Display Options for this workbook has "For objects, show:" All is selected.
I'm aware that I could create a combobox to replicate the function of the dropdown, but I'm under the assumption that all other cells in the spreadsheet that use Filter() and Sort() wouldn't work.
Is that a correct assumption to make? Is there a way to have these functions work in Excel 2019? If the file were uploaded to SharePoint, would that allow the client to use the file?
Thanks for your consideration. This is my first post. I hope it was clear. If not, I will try to further clarify.
Thanks again.
The client uploaded the file to SharePoint and was able to use the file without issue. This solved the issue of the dependent dropdowns not functioning, and also made sure the rest of the file worked correctly with the Filter() and Sort() functions creating spilled arrays.

Get MDX generated by Excel cube formulas

I have a requirement to open excel workbooks in a web environment, rendered using a third part excel emulator (Aspose cells). This works fine until I hit workbooks which use cube formulas (CUBEMEMBER, CUBEVALUE etc), The Aspose product (and the same is true for every other third party excel rendering engine) does not support cube formulas. So, as a workaround, Aspose lets me implement a custom excel formula engine and intercept calls to cube formulas during processing. I can then attempt to recreate the corresponding MDX which Excel would have generated based on the cube formula name and parameters, and then manually execute the same queries using the dot net framework.
My question is, can anyone help with a method for trapping the mdx generated by Excel when it processes a cube formula? I know with pivot tables pointing to OLAP cubes, using VBA it is possible to capture the mdx generated by switching measures and dimensions. Is there an equivalent thing with cube formulas in Excel? Or is my only option to sniff activity on the cube when my workbook is processed using Excel?
Thanks in advance (hopefully).

Can an office addin / app (non-com) add a formula to Excel?

I am wondering if an Office addin (the new term for "app"), that is a Non-COM Office Addin (introduced in Office 2013) would be able to add a formula to Excel?
As I read the documentation, it is only possible to add a taskpane or to access the document. However, I cannot add a formula which will call a (Javascript) function from my addin and then puts the return value in the excel cell.
So e.g. if I would like to create the formula
=MultiplyBi3(value)
I would need to create an Excel RTD Server with a COM Addin, and cannot use Office Apps.. sad but true?
The Javascript API can add a formula to a cell or a Defined Name formula (JS calls them Named Items) but cannot create a UDF function, and certainly cannot create a RTD server either (but neither can VBA).

Insert Excel validation list in excel using Javascript

We are using Excel 2016 Add-In to load data from DB to Excel 2016 (few Excel 2013). There is a column 'Status' in Excel. Currently it is simple text cell. We need Excel drop-down list in Status cell (refer below example image).
We are using JavaScript for loading Excel 'Office.context.document'. We need the solution in JavaScript.
Please provide a solution in JavaScript, C# or Insert HTML in Excel etc.
Thanks in Advance...

Replicate Google spreadsheet array formula in Excel

I’ve got Google form survey data I’d like to analyse. In my example doc,
Sheet 1 contains the survey responses and sheet 2 references the data in sheet 1. Sheet 2 is where I am using this array formula under the column called Behaviour:
=ArrayFormula(if(len(A3:A),if(Sheet1!Question3="Yes","Excluded ",)&if(Sheet1!Question5="Yes","Arrested ",)&if(Sheet1!Question6="Yes","Alcohol ",)))
The issue is that I need to be able to download this Google spreadsheet as a Microsoft Excel doc but whenever I do that, of course the Google spreadsheet =ArrayFormula() function is not supported in Microsoft Excel.
My question is how could I replicate this array function’s behaviour using another method in Google spreadsheet so that I get the same result when it’s downloaded to Microsoft Excel?
What I’ve been able to find in the forum so far are questions on how you can manually copy formulas to multiple rows in Excel. The trouble with these methods are that the user has to do it by either clicking and dragging the bottom right-hand corner of the cell or by using shortcuts. I’d like my process to work so that the user doesn’t have to manually do anything.
Many thanks in advance.
Excel support array formulas but it does that in a different way than Google Sheets.
Instead of an ARRAYFORMULA function, Excel requires that the formula autor/editor, first selects the area to which the array formula result should be extended, then enter edit mode and press CTRL+SHIFT+ENTER. See Create an array formula that calculates multiple results on Create an array formula
It is possible to replicate the Google Sheet ArrayFormula in MS Excel using the OFFSET() formula even if it's not as simple as the ArrayFormula function.
The full documention of the function can be found here.
https://support.office.com/en-us/article/OFFSET-function-C8DE19AE-DD79-4B9B-A14E-B4D906D11B66
A quick example
Google Sheet
= ARRAYFORMULA(SQRT(Sheet2!A:A))
=> This will copy the full column A for the Sheet2 taking the square root of each value.
Excel Version
= SQRT(OFFSET(Sheet2!A1,0,0,COUNTA(Sheet2!A:A),1))
=> This will take a reference of the column, but we have to manually specify the height and width of the reference before taking the square root of each value.
You may very well discover that this is not possible; at least not in every case. There may be a few formulae which have the exact same definition in Google sheets and Excel. however, it's not guaranteed to work in general.
Some more detailed information here: Sheets vs Excel forumlae

Resources