Remove AddIn path from UDF in Excel formula - add-in

My addin was xla, now I use excelDNA, so it becomes xll,
When I open spreadsheet built in previous version of My addin,
for the UDF, it shows myUDF with path of xla. e.g "C:\Program Files\Installation folder\MyUDFs.xla!MyUDF",
when I click Edit link and change source to "C:...\MyUDFs.xll"
I got a pop up which says
"Excel cannot update one or more links in this workbook. To update the links, open all the link source files(click Edit Links on the Data tab).
To be sure all calculations are updated. press F9"
I click OK, then the path of MyUDF changes from xla to xll, e.g. C:\Program Files\Installation folder\MyUDFs.xll!MyUDF
For clients, this will break all their spreadsheets (could be 100+) built in previous version.
I know I can write a VBA code to remove paths from all MyUDF. but it is not ideal since users have to open up spreadsheet and put the code in spreadsheet and run.
I wonder if there is a better/more convenient way for clients to solve the issue
thanks

Internally, Excel stores different information for an .xla function
and an .xll function. It's not so easy to around so that you can make
an .xll that is compatible with functions that were entered into the
sheet as functions in an .xla.
You can also see how Excel stores this information by poking around inside the .xmlx file a bit.
This Wilmott discussion might be relevant:
http://www.wilmott.com/messageview.cfm?catid=10&threadid=79763
For your case the best I can suggest is adding a conversion macro to
your .xll, and having the user press the 'Fix-up' button when they
open spreadsheets that have not been converted yet.

This is the solution I use at last. I keep my xla addin, in xll, I register the same MyUDF with the same sigature(while, almost the same, optional parameters are not supported in xll, but are used in my xla) and set IsHidden = true. So there is only one MyUDF shows up in insert function list. When you type in =MyUDF and click function wizard, the version in xll shows up in function argument window. In Excel 2007, when I type =MyUDF, there is no function in drop down. In Excel 2010, when I type =MyUDF, there is a drop down. So the solution works better in Excel 2010.

Related

No permission to use getFileById in google spreadsheets

I have following problem.
I have two files:
Source file - https://docs.google.com/spreadsheets/d/15zIdIeYFlca-SQ0ryl89oX_tbGjO_6cipqHkkxog7ho/edit#gid=0
Target file - https://docs.google.com/spreadsheets/d/1gGExeO2x8pqNzTPRvel8p-wwe-BDkdF5c6BFA8j_Py0/edit#gid=0
In the source file there is a script (function is named onEdit triggered with onEdit event). When you change the value of R3 cell (Source File) to other "Advisor" whole row should be copied to target file, but sometimes it works, sometimes not. If you change the value of advisor field once and it works try couple of times more and for sure there will be a problem with permission in a while.
When it's not working I get msg that there is problem with permission of executing function called getFileById, which is used in following line:
var file = DriveApp.getFileById('1gGExeO2x8pqNzTPRvel8p-wwe-BDkdF5c6BFA8j_Py0');
Any ideas what to do to solve the problem and why sometimes it works fine ?
Scripts using a 'simple' trigger can modify the file they are bound to, but cannot access other files because that would require authorization.
See here to learn more about the restrictions on simple triggers.
You can make sure you have all the permissions following the next steps:
Open the script project. At the left, click Project Settings
Select the Show "appsscript.json" manifest file in editor checkbox.
At the left, click Editor <>.
At the left, click the appsscript.json file.
Locate the top-level field labeled oauthScopes. If it's not present, you can add it.
The oauthScopes field specifies an array of strings. To set the scopes your project
uses, replace the contents of this array with the scopes you want it to use. For
example:
{"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.readonly", "https://www.googleapis.com/auth/userinfo.email"], }
Retrieved from: https://developers.google.com/apps-script/concepts/scopes

How I can add some items to the code completion combobox of the Delphi IDE

I'm working in a Delphi IDE expert and I wonder if it's possible add new items to the code completion combobox displayed by the Delphi IDE when the user press CtrlSpace
UPDATE:
What I need is add items to the code completion list based in a specified type.
example suppose which I have a type called TMytype, what I want to do is add addional items to the code completion list when the user type a variable of the type TMytype
check this image
I found your question somewhat confusing but if you are in search of credible source on "Custom Live Templates" and the like on Delphi, head to the blog of Cary Jensen here.
Edit:
Looking forward to further improvement of the scope of the question, I suggest here another direction to explore:
Source code manipulation using IOTAEditor, IOTASourceEditor, IOTAEditReader and the like
Some Parsing for sanity check prior to apply any modification.
Adoption of Client DataSet as a format to store data (It's serializable) to simplify the coding of IDE editors.
Perhaps I haven't fully grasped the extent of what you are asking here, but you can add templates simply by going to 'View|Templates' from the Delphi IDE. This then opens a template viewer. Press the '+' icon. It opens a template1.xml document which you can then edit so create your new item.
If you wish to do this programatically, just add an xml file (of the same format) to the ..\RAD Studio\code_templates folder.

Does Texniccenter or any other tex editor auto-complete references in Latex?

I want to use a latex editor that has auto completion feature for existing references in a latex file. Do you know any good ones? I am trying to find this feature in texniccenter, but I guess it doesn't exist or I could't find it yet.
Update:
Ok, I found how to enable auto completion in Texniccenter. I needed first create a project. Then open the file in this project (or copy its text). Now Ctrl-Space inside a \ref{} tag completes the reference automatically.
Texlipse does this, also with Ctrl+Space.
Inlage includes such a function, too. New commands and new environments will also appear in the auto completion list. If you use extern BibTex files the \cite{} command will open a list with your articles and books from you .bib file.
Ok, I found it. I needed first create a project. Then open the file in this project (or copy its text). Now Ctrl-Space inside a \ref{} tag completes the reference automatically.
Kile has reference completion. If you type Ctrl+Space inside of a \ref{}, you get a list of all the references (that existed last time you compiled, of course).
LEd presents a click list of them when in a \ref{}
The RefTeX mode for Emacs will do what you're asking for: the shortcut C-c ) activates the "insert a \ref" mode (of course, you can customize which type of reference: fancyref, hyperref, etc) and pressing TAB will allow you to start typing and autocomplete by tabbing again after typing some characters.
It also figures out (or asks if it can't) what sort of ref you're inserting and shows a list of all the defined \labels in your document, selectable with the arrow keys or C-n / C-p.
Now we just need a Vi user to come along and tell us how to do it there...
Now texmaker does, not need any special key.

how to clear the wireshark filter combo contents

Does anyone know how to clear the filter drop down (combo) contents in Wireshark? Are the contents stored in a file somewhere?
For the life of me, I can't figure this out. And, the Wireshark help file only tells me "The entries in the pull down list will remain available even after a program restart."
Sigh...
Answered my own question.
The filter history is stored in
c:\documents and settings\foo\Application Data\Wireshark\recent, where "foo" is your windows user name.
I don't use Wireshark in Linux, so I don't know where this file lives there. I would imagine in your home directory.
In that file, there's a section labeled "######## Recent display filters (latest last), cannot be altered through command line ########". Each recent.display_filter line is an entry in the filter drop down. Just remove the filters you don't want in the drop down, or remove them all to clear the filter history entirely.
They're in ~/.wireshark/recent and named "recent.display_filter".
This is now in %APPDATA%\Wireshark\recent_common
AKA C:\Users\username\AppData\Roaming\Wireshark\recent_common
Look for the ######## Recent display filters (latest last), cannot be altered through command line ######## section.
I found how we can remove saved wireshark filters on Windows10 systems:
First you have to go to this directory C:\Users\<your_username>\AppData\Roaming\Wireshark and open the recent_common file with any text editor and then press on CTRL + f search the name of the filter that you want to delete and delete the whole line and the filter will never come back!
I hope I could help you.

Delphi Short Cut to add Date and Name Comment

Does anyone know of a short cut to place my name and the date where the cursor is i.e.
//021208 DarkAxi0m
so i don't keep check what the date is when i'm adding comments.
Im using Delphi7, with CnPack And GExperts Installed.
I think it should be able to be done with one of those experts.
I use GExperts to do this, like so:
in the
GExperts\Configuration
Select the Editor Experts tab.
In the list of experts, select
Insert Date\Time
Click on the configuration, insert the desired text:
'//' ddmmyy 'DarkAxi0m: '
//021208 DarkAxi0m:
After, to insert your new Date name comment all you need to do is:
ctrl+alt+a
I setup most programmers at the job like that.
It is also simple to do with GExperts' Expand Macro Template (found in Editor Experts).
I use this expansion to insert yyyy-mm-dd at the current position:
%YEAR%-%MONTH%-%DAY%|
For a solution that will work in most applications under Windows, not only in Delphi, you can use Authotkey (free, autohotkey.com). One of its many features is the ability to expand strings that you type - typically used for autocorrecting typos.
I start all my shortcut strings with a semicolon, since it practically never leads strings I type in real life, so in your example, to insert a comment-date-username sequence, I would want to type semicolon, slash, slash:
;//
The Authotkey script (which you can put in an .ahk text file and add the file to Autostart) would look like this:
::;//:: ; this means: when I type ";//", do what follows
FormatTime, curDate,, yyyy-MM-dd ; the double comma is intended
SendInput // %curDate% %A_UserName% ; variable expansion
return
This produces the following output:
// 2008-12-05 moodforaday
AHK syntax is a little dense, but there is an extensive help file.
On edit: this script could be expanded to apply the correct comment syntax depending on the IDE you are working in at the moment. You would detect active window title, find a signature substring ("Delphi") and choose the proper comment character(s). This way you could type the same hotstring to insert your comment regardless of the current IDE or language. You can also use SendInput to position the caret the way Delphi templates do.
Never mind found one in CnPack/Soure Templates
Added the template
//%Date% DarkAxi0m
Note: i should look in the menus more closely
You might also look at the Live Templates feature, which can be scripted to do just what you want:
http://cc.codegear.com/Item/24990
Don't be put off by the name, it includes a template script to include the date, time, including the ability to format it as you want.
Here is a variation with GExperts (www.gexperts.org) that makes it easy to search for changes based on developer or date.
Example of output and comment:
//07.25.2009 (SLB20090725) - Added 3rd optional parameter.
Besides an easily readable date I can easy search for comments programmer, by year, year+month etc.)
For example I can search for (SLB200905 for any comments I logged in May of 2009.
To do:
Under the GExperts menu open Configuration... (at the bottom of the list) then select the Editor Experts tab.
Locate 'Insert Date/Time' and double click on it.
//mm.dd.yyyy '(ABC'yyyymmdd') -'
Where ABC is the programmers name, initials, id, or whatever.
Then use Ctrl-Alt-A when in Delphi's IDE to insert
This should work in any verison of Delphi supported by GExperts.

Resources