Check if a cell has a single quote in the beginning - ms-office

In Excel, in a cell we could add a single quote before a formula (e.g., '=3+4), to let the formula not evaluate. And in the formula bar, we could see the single quote.
Is there a JavaScript API to check if a cell has such a single quote?
We tried formulasLocal and values, but they all returned the formulas and formulas without the single quote.

Currently there is no JavaScript API to check if a cell has such a single quote. We track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum, please add your request there. Feature requests on are considered when we go through our planning process.
Thanks,
Microsoft 365 Developer Platform Team

Related

Excel Define Cell Name Using Office.JS

In Excel 365 app, how I can set the Name using excel 365 api at runtime ? In Dev.Office.com, they have provided read-only property to get the name.
Background:
Working on Excel Office 365 apps. We have a pre-define template and for every cell which we use in calculation have defined names for it.
I need to provide the functionality to add multiple cells based on user request(button click on task pane) and use these cells in calculation. I know how to add the field(cells) but stuck at defining the names. There is no way for us to evaluate the formula unless we use excel cell reference such as (B10, C24, etc) which we want to avoid.
Is there any other option to use like content control ?
Note : This is I wanted to do using excel 365 api.
Currently, the names (named ranges and any other constants) are in fact read-only. The good news is that we are in the process of implementing the named-range-addition/manipulation functionality. Unless we run into unexpected difficulties, we should have it available in the coming months (likely as part of ExcelApi 1.4 -- though again, no guarantees there, just an estimate if all goes to plan).

Calling a webservice URI from excel sheet cell

I need to call a webservice URI from an Excel cell. I know this can be done using the in-built WEBSERVICE function. However, passing the parameters on the fly to the URI can be a bit tedious.
For.eg. my webservice URI is :
http://localhost/getEmployeeSalary?emloyeeName=MisterFoo&employeeId=101
The values MisterFoo and 101 are pulled from other cells in the sheet.
So what I am looking for is to call the service like an Excel function (SUM, AVG, etc.), which would look like
=getEmployeeSalary(A2,B4)
where A2 cell contains MisterFoo and B4 cell contains 101.
For now, I have tried looking for a solution but the only thing that comes up is using ribbons (Excel Add-in project in Visual Studio) that take parameters and store the value in a pre-defined cell. This is not what I am looking for though.
Any help or suggestion would be appreciated. Thanks in advance!
you could potentially use a user defined function?
https://support.office.com/en-sg/article/Create-Custom-Functions-in-Excel-2007-2f06c10b-3622-40d6-a1b2-b6748ae8231f
You need to develop an add-in where you can run secondary threads calling web services because such operations can take a lot of time get results. See Walkthrough: Creating Your First Application-Level Add-in for Excel for more information.
I do this all the time using the Excel Concatenate function.
=WEBSERVICE(CONCATENATE("http://localhost/getEmployeeSalary?emloyeeName=",A2,"MisterFoo&employeeId=",B4))
You can use the Evaluate Formula option from the Formulas menu item to step through the function.
Hey guys I really appreciate your help. This is what I was looking for: http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx

Building a URL using Visual Basic

My name is lee, and I'm new on here. I'm very experienced in Excel, and most aspects of Office, but not so much in VBA.
I have embedded a local map using an API in excel, and want to plot multiple postal codes. I have this working up to 23 postal codes using a Hyperlink and Concatenate in the same formula to build the URL. After 23 postal codes, the formula result exceeds 255 characters, so that's where I fail.
I need one solution - either a way to work around the limit (without using a 3rd party url shortener), or by building the entire URL in VBA. My button launches the formulated url from cell A1, but when it exceeds 255 characters, I assume I will need the button to run the url directly from within VBA?
Anyhow, I'm sure I've probably missed out some vital info, so please, if you think are able to help, ask me and I'll give as much extra detail as possible.
You can split the long string in lets say 2 variables and then use them in VBA to concatenate it with your formula.
An example of what you have would be better.

Refreshable Web Query using Excel 2010 and Parameters

I'm looking to pull into the XML feed from Feedburner's API. This is just a matter of writing the URL and using the "From Web" data connection in Excel.
https://feedburner.google.com/api/awareness/1.0/GetItemData?uri=RSSFEEDNAME&dates=2011-08-01,2011-08-05
This works fine (and is pretty fast).
Now, I'd like to be able to update two cells in the "dates" sheet to have it pull that range of data. This is done using parameters in the URL:
https://feedburner.google.com/api/awareness/1.0/GetItemData?uri=RSSFEEDNAME[]
Using the Excel UI, I can then assign the [] to any cell. However, no matter what I try, this doesn't work. I initially thought there might be some issue with the date format so I've worked myself to the point where I am entering into the cell, the exact copy (&dates=2011-08-01,2011-08-05) as text.
Each time, the feed pulls up with just the current days data (which is the default behavior when no dates are specified). It isn't giving an error (which it will do for relatively small infractions, like not having two-digit months) which makes me think it just simply isn't replacing the [] with the specified text. I'm also using this same method for a WebTrends Web Service query and gettign similarly frustrating results. I've read every how-to on web queries, and I'm following them exactly.
I can't find any place to see what the final URL Excel is requesting, so it's a bit of a shot in the dark. Any thoughts on next steps would be greatly appreciated!
Best,
Nathan
The answer was no to use the Web Query "wizard" and just do it by hand.
Open Notepad (or some text editor)
In the editor type the following four lines:
WEB
1
http://example.com/index.html?something=[]&somethingelse=[]
[BLANK]
Save it as anything with an .iqy extension.
Open Excel, go to the Data ribbon, and click "Existing Connections"
Click "Browse for More..."
Find the IQY file you made and click "Open"
Excel will then ask you where you want to put the resulting data, followed by prompts for each placeholder you entered in the URL. Those prompts let you either type in a value, or select a cell to act as the data.
I would have thought that dates should have been a named parameter and that you should link that to whichever cell has the date value(s).
The cell should just have 2011-08-01,2011-08-05 as its value as long as you create the named parameter dates and link it to that cell

Aspose Cells Numeric Formatting With Processed Datasource

I am new to Aspose Cells, having inherited a project that uses it. A requirement was added that numeric values in cells be actual numbers - they were formerly text.
So, I changed calls in the code that called Cell.PutValue() to use the overloaded version of the method that takes the bool isConverted. Passing a value of "true" in that parameter solved the problem for these instances.
However, in other places in the code, we export data from our website into a spreadsheet by using ExcelDesigner.SetDataSource() and ExcelDesigner.Process(). The spreadsheets resulting from this approach also have numbers stored in cells as text.
How can I convert the text to numbers in this case, as I did with the PutValue() case?
It turns out that Aspose uses something called "Smart Markers", which are directives embedded into the cells of template spreadsheets that Aspose Cells uses to decide how data should be inserted into them.
Smart Markers have optional "parameters", which are parenthesized, comma-separated modifiers giving further processing instructions. The "(numeric)" directive achieved the result that I was looking for.
You may also post a query directly in Aspose.Cells forums, in case you need any further assistance. As those forums are monitored by our support and development teams.
Disclosure: I work as developer evangelist at Aspose.

Resources