Hi Paul,
I made a small add-in using the ExcelDnaDoc v 1.6.0-RC1 package, and that seems to build and work correctly.
I’m not sure in what context the explicit command would be running, or what version you are using at the moment.
But for me the package works OK.
The error you see referring to an “assemblyFile” parameter doesn’t seem to come from the ExcelDnaDoc code itself, so I’m not sure what it might mean.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/e1bb8989-9185-458e-9033-7395fac3875cn%40googlegroups.com.
Hello, Govert –
Thanks for your quick reply. This is an interesting
problem. Here are some additional
details.
1. As suggested in https://github.com/Excel-DNA/ExcelDnaDoc, I downloaded htmlhelp.exe (the "HTML Help Workshop" installation file) from the following site:
To install the software, I ran htmlhelp.exe. It stated
that it would install version 1.3.
But it
installed version 4.74.8702.0 instead.
The
application, including hhw.exe and numerous other files and subfolders
is located in "C:\Program Files (x86)\HTML Help Workshop".
2.
Using the NuGet Package Manager, I installed “ExcelDnaDoc
v 1.6.0-RC1” in my project.
But I couldn’t find ExcelDnaDoc.exe anywhere on my computer.
3. So, I created a small test project: “Class Library (.NET Framework) - A project for creating a C# class library (.dll)”. Using the NuGet Package Manager, I added the following packages:
<package id="ExcelDna.AddIn" version="1.6.0-rc1" targetFramework="net48" />
<package id="ExcelDna.Integration" version="1.6.0-rc1" targetFramework="net48" />
<package id="ExcelDna.Interop" version="15.0.0" targetFramework="net48" />
<package id="ExcelDna.Registration" version="1.6.0-rc1" targetFramework="net48" />
<package id="ExcelDnaDoc" version="1.6.0-rc1" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
Once again, ExcelDnaDoc.exe was nowhere to be found.
4. As a last resort, as suggested in
https://github.com/Excel-DNA/ExcelDnaDoc/blob/master/docs/content/index.md
,
I downloaded the compiled binaries (Excel-DNA-ExcelDnaDoc-4fc9a57.zip)
from https://github.com/mndrake/ExcelDnaDoc/zipball/release. Then I unzipped it to C:\...\ExcelDnaDoc\ .
In the Visual Studio “Developer Command Prompt”,
I ran ExcelDnaDoc.exe with its complete path name, first for my VB project, …
C:\...\ExcelDnaDoc\ExcelDnaDoc.exe "Kalends\Kalends-AddIn.dna"
… and then for my C# test project,
C:\...\ExcelDnaDoc\ExcelDnaDoc.exe " ClassLibrary3\ClassLibrary3-AddIn.dna"
In both cases, I got the error message:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: assemblyFile
The "HTML Help Workshop" is installed under "C:\Program Files (x86)\HTML Help Workshop".
========
To summarize, the foregoing raises two questions, both related to ExcelDnaDoc.exe:
========
Sorry for burdening you with this
lengthy narrative. But I hope that it
leads to a solution.
Whatever the outcome, I’m very grateful for your help.
– Paul
Hi Paul,
When you rebuild now, with the ExcelDnaDoc package referenced, do you get a folder called “HelpContent” in your output directory? Do you get a file called xxx-AddIn.chm?
I get these, created by the build tasks in the ExcelDnaDoc poackage.
There is no ExcelDnaDoc.exe shipped with the NuGet package – it just runs as a normal build task from a library assembly.
If you clone the ExcelDnaDoc repository and rebuild, you’ll get an ExcelDnaDoc binary being built that should work.
If it does not work you might need to run it under a debugger.
But I suggest just using the NuGet package.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/67ed09b8-f2cc-4908-8913-015da2a7bc26n%40googlegroups.com.
Hi Govert –
Success! ExcelDnaDoc is working now!
As implied in your latest email below (Wednesday, September 28, 2022 18:11), we don’t generally run ExcelDnaDoc.exe in a “Command Prompt” Window. In fact, it seems that I don’t even have to know that ExcelDnaDoc.exe exists. As you said, ExcelDnaDoc does all its work during the “Rebuild Solution”.
To answer your questions in that Wednesday email, after “Rebuild Solution” …
i. One *.htm help document for each registered function or command.
ii. helpstyle.css, which I assume can be modified to taste.
iii. Table of Contents.hhc (an html file).
iv. Kalends-AddIn.hhp
i. Kalends\Kalends\HelpContent
ii. Kalends\packages\ExcelDnaDoc.1.6.0-rc1\tools\HelpContent
iii. Kalends\packages\ExcelDnaDoc.1.6.0-rc1\content\HelpContent
I have a few more questions. Following is a typical function definition in my VB code:
<ExcelFunctionDoc(
Category:="Kalends - Date Functions",
HelpTopic:="Kalends-AddIn.chm!1050",
Description:="Returns the day of a given Date Serial Number.",
Returns:="Julian or Gregorian integer Calendar Day",
Remarks:="<p>K_DAY is a generalization of Excel's built-in DAY function.</p>")>
Public Function K_DAY(
<ExcelArgument(Description:="Required. A Serial Number for the desired date. A signed integer. 1899-12-30 is zero, and earlier dates are negative.")>
DateIndex As Integer,
<ExcelArgument(Description:="Optional. 0 or omitted=Gregorian, 1=Julian, 2=British")>
Optional WhichCalendar As Integer = 0 ' = EnumWhichCalendar.Gregorian
) As Object
My “HelpTopic:=” specification names the *.chm file, followed by !nnnn, where nnnn is a 4-digit number. It appears that I can choose any unique 4-digit integer (1050 in this example), and then ExcelDnaDoc inserts it into the help data file.
My “Remarks:=” specification contains HTML mark-up.
<a href="https://support.microsoft.com/en-us/office/date-function-e36c0c8c-4104-49da-ab83-82328b832349">DATE</a>
doesn’t. Although it creates a nice-looking link in the help, clicking it doesn’t seem to work.
Is this feature intended to be supported?
Somewhere, I think that you explained that Excel Spreadsheets don’t understand Enumerations. Therefore, the above definition contains
Optional WhichCalendar As Integer = 0
rather than
Optional WhichCalendar As EnumWhichCalendar = EnumWhichCalendar.Gregorian
Thanks for all your help. The entire ExcelDna suite is first rate. You have filled a tremendous void in Visual Studio’s support of Excel.
Paul Margus, FSA, MAAA
49 Webster Road
PO Box 484
Tyringham, MA 01264
This e‑mail and any attachments are solely for the addressee. The content may be PRIVILEGED, CONFIDENTIAL, PROPRIETARY, and COPYRIGHTED. Any unauthorized use, dissemination, or copying is prohibited and may be unlawful. If you are not the intended addressee, please notify the sender immediately and delete this e‑mail, attachments, all copies, and any printout.
--
You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/exceldna/Mgg-8cOH7E4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/057401d8d387%243eb1b930%24bc152b90%24%40gmail.com.
Hi Paul,
Yes, this is correct.
By default he add-in base name and help file name is taken from the project name with “-AddIn” appended.
But you can override this by setting a property in the project file called <ExcelAddInFileName>MyAddInName</ExcelAddInFileName>
It works for me, - maybe you need extra quotes around the link, or there is some setting that prevents your help viewer from navigating to the web site.
It depends how you want this to work in Excel. You could set things up so that your function takes a string as input, and interprets that as an enum value when evaluating the function. Javascript add-ins in Excel have some way to define extended “data types” , but this is not available from our .xll add-ins. Maybe Microsoft will allow that some day?
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/000001d8d5e0%24965e1b50%24c31a51f0%24%40MargusConsulting.com.
Hi Govert –
Thanks for the answers.
I found that it’s better to insert the attribute target="_blank", as in
<a target="_blank" href="https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252">DATEVALUE</a> function.</p>")>
(Because Remarks:="" is a VB string each double-quote must be repeated as in target=""_blank"".)
Without this attribute, it attempts to open the website in the Help Window and displays a Scripting Error.
I made another discovery: The Category:="" attribute must not contain a colon (:).
Therefore,
If you include a colon, the Build fails with the following message:
The "CreateDocumentation" task returned false but did not log an error.
Not very helpful.
Anyway, thanks again.
3. So, I created a small test project: “Class Library (NET Framework) - A project for creating a C# class library (.dll)” Using the NuGet Package Manager, I added the following packages:
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/008b01d8d694%243ba877f0%24b2f967d0%24%40gmail.com.