I am looking for ways to write my own function in excel that I can use directly in cells, but I do not want to use VBA or COM. My preferred language would be javascript or C#.
I am using office 365, so I have the latest version of Excel. Also, it would be nice to make it work on Windows and Mac.
Have you checked out this answer found here on stackoverflow? It includes a link to Excel-DNA and some sample code to create your own functions.
Creating new Excel formulas/functions with C#
Related
There is no option to create a javascript in create option. But in most of the youtube tutorials they are using the .js files .Is there any way to use js file.
Is this issue occurs due to missing of any libraries.?
The Unity 2017 no longer has a ‘Javascript’ option in the Create Assets menu. They had already removed the javascript option; but all the support is still there, and you will still be able to create new UnityScript files outside of Unity (for example, via MonoDevelop or etc).
As version 2018.2 JavaScript is no longer supported, It would be best to learn C# if you want to use the Unity Engine. There is literally no reason to use JavaScript over C# in Unity since Unity has deprecated it.
Source: http://wiki.unity3d.com/index.php/UnityScript_versus_JavaScript (Has a link to the JS to C# converter right at the top)
If you really want to continue to write your scripts in JavaScript, there is a tool to convert your JS files to C# but I wouldn't recommend that approach, simply because who knows how long until that tool itself becomes deprecated.
The last option to use JavaScript would be to use an older version of the engine...
We use iframe to show pdf in our angular webapp. These pdfs have href links inside them that actually are calls to javascript function.
It looks like below.
href="javascript:openMyLink('stringOfInformation')"
function openMyLink is supposed to be present in my webapp and it will use passed stringOfInformation to make further REST calls.
The problem is I'm not able to figure out where and how do I write this function. This function may be of global space but it should also be able to access my
angular services inorder to make REST calls.
I tried writing it inside my controller and even inside a separate file but it is not getting invoked.
Please guide me on this.
Acrobat does support its own flavor of JavaScript (see the Acrobat JavaScript documentation, which is part of the Acrobat SDK, downloadable from the Adobe website).
When there is some JavaScript within the PDF, it has to be Acrobat JavaScript, and follow the according document object model.
The issue is more that in order to make use of that, your users will need a PDF viewer which is smart enough to deal with Acrobat JavaScript (and that number is quite small for Windows/macOS, and very small for iOS/Android, and it is null for the PDF viewers integrated in the web browsers.
Now, if it is a simple link, you won't even need Acrobat JavaScript. Instead of that specify the link within the PDF, using the Link tool. This may be understood by even a bit a bigger range of PDF viewers.
I am new to developing webapps in Intellij so this may be a simple question. How do I get it to properly display Javascript syntax when I am editing scripts within an HTML page. For example when I create an external file with a .js extension it properly formats the Javascript, but when I have in in-file Javascript function it fails to pick up on it and displays it as plain text. Is this a limitation of the community edition?
It is most likely a limitation of the comunity edition. If you go to the comparison page you will notice a few differences:
I was wondering if it would be possible to use Javascript to search through a column of an excel spreadsheet for a value that matches what a user types into a textbox. If a match is found I'd like to retrieve the row number the match was found on and put that number into a variable. I'm making a small database and would like this site to independent of using a database program like SQL if possible.
Is it possible to accomplish this with javascript? If javascript is incapable of this is there any other scripting language that can handle this task?
Thanks
You can use JavaScript with older versions of Excel. Here's an example: http://support.microsoft.com/kb/234774
You can use Windows Script Host to run in a shell other than a browser:
http://msdn.microsoft.com/en-us/library/9bbdkx3k(v=vs.84).aspx
Here's the Excel 2003 API reference:
http://msdn.microsoft.com/en-us/library/aa272268%28v=office.11%29.aspx
Scripting Microsoft Excel in JavaScript is a new thing, only Office 2013 supports it. Here is the doc. Here is a useful intro.
For older Office versions, use VBA macros, or write an application in C# which uses Microsoft.Interop, as #PortlandRunner suggested.
UPDATE I forgot to mention that C# is not the only technique to work with Excel files from external code. #KevinCollins is right, there is JScript and VBScript too. For the sake of completeness, I would like to add PowerShell to the list, you can also work with Excel files using PowerShell.
Is anyone familiar with plugging a function into a PDF document (specifically, the "insert custom code" feature in Adobe Acrobat Pro)? I know it's possible to initiate a function on an event...but I'm not sure what event would best handle this. I'd assume a button press. Also, does anyone know which language is compatible with PDFs? Is Javascript the only one? I don't imagine a server-side code (like PHP or Ruby) would work. Or the use of a framework like JQuery. Maybe it's only ActionScript or some strict language like C#. I dunno :S
Have a look at this page on the Adobe Acrobat developer site:
http://www.adobe.com/devnet/acrobat/overview.html#JavaScript
This explains that the language you're referring to is JavaScript with a number of additional objects related to Acrobat itself exposed.
So if you want to add functionality inside a PDF file (commonly either as the result of a button press indeed, but you can also do field validation, things at document open etc...) it will have to be JavaScript. Read this page to get all details about JavaScript (including the reference):
http://www.adobe.com/devnet/acrobat/javascript.html