Skip to content

Commit dd24935

Browse files
committed
Update NuGet package specifications
1 parent 6af8a1b commit dd24935

File tree

11 files changed

+230
-181
lines changed

11 files changed

+230
-181
lines changed

Distribution/GettingStarted.txt

+120-120
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,121 @@
1-
Getting started with Excel-DNA
2-
==============================
3-
4-
Do this first:
5-
--------------
6-
7-
* The .NET 2.0 runtime must be installed (or .NET 4 with additional settings).
8-
The .NET Framework Version 2.0 Redistributable Package is available from Microsoft here:
9-
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en
10-
11-
* Macros security in Excel must not be 'Very High' or 'High' (if set to Medium -- it will prompt whether to enable each macro library). To use the .NET macros you will have to 'Enable' at the prompt.
12-
13-
14-
1. Create a user-defined function in Visual Basic
15-
-------------------------------------------------
16-
* Make a copy of ExcelDna.xll in a convenient directory, calling the copy Test1.xll.
17-
* Create a new text file, called Test1.dna (the same prefix as the .xll file), with contents:
18-
19-
<DnaLibrary RuntimeVersion="v2.0" Language="VB">
20-
<![CDATA[
21-
22-
Public Module MyFunctions
23-
24-
Function AddThem(x, y)
25-
AddThem = x + y
26-
End Function
27-
28-
End Module
29-
30-
]]>
31-
</DnaLibrary>
32-
33-
* (To target .NET 4 or .NET 4.5, use RuntimeVersion="V4.0" instead.)
34-
* Load Test1.xll in Excel (either File->Open or Tools->Add-Ins and Browse).
35-
* You should be prompted whether to Enable Macros, click Enable.
36-
* Enter =AddThem(4,2) into a cell - you should get 6.
37-
* There should also be an entry for AddThem in the function wizard, under the category Test1.
38-
39-
Troubleshooting
40-
---------------
41-
* If you are not prompted to Enable Macros and nothing else happens, your security level is probably on High. Set it to Medium.
42-
* If you get a message indicating that the .xll file is not recognized (and even opening it as text), you might not have the .NET Framework 2.0 installed. Install it. Otherwise Excel is using .Net version 1.1 by default. To change this, refer back to the prerequisites section.
43-
* If Excel crashes with an unhandled exception, an access violation or some other horrible error, either during loading or when running the function, please let me know. This shouldn't happen, and I would like to know if it does.
44-
* If a form appears with the title 'ExcelDna Compilation Errors' then there were some errors trying to compile the code in the .dna file. Check that you have put the right code into the .dna file.
45-
* If Excel prompts for Enabling Macros, and then the function does not work and does not appear in the function wizard, you might not have the right filename for the .dna file. The prefix should be the same as the .xll file and it should be in the same directory.
46-
* Otherwise, if something goes wrong, let me know or post to the Google group noted below.
47-
48-
2. Creating a user-defined function in C#
49-
-----------------------------------------
50-
* Change the contents of Test1.dna to:
51-
52-
<DnaLibrary RuntimeVersion="v2.0" Language="CS">
53-
<![CDATA[
54-
55-
using ExcelDna.Integration;
56-
57-
public class MyFunctions
58-
{
59-
[ExcelFunction(Description="Joins a string to a number", Category="Useful functions")]
60-
public static string JoinThem(string str, double val)
61-
{
62-
return str + val;
63-
}
64-
}
65-
66-
]]>
67-
</DnaLibrary>
68-
69-
* Reload the .xll, either from File->Open or in Tools->Add-Ins.
70-
* Check with the formula =JoinThem("abc", 123)
71-
* If the first example worked, this one should too.
72-
73-
3. Making the functions from a compiled library available
74-
---------------------------------------------------------
75-
Excel-DNA can also load any compiled .NET library. Public static functions with a compatible signature are exported to Excel.
76-
77-
* Create a file called TestLib.cs containing the following code:
78-
79-
using ExcelDna.Integration;
80-
81-
public class SomeClass
82-
{
83-
84-
[ExcelFunction(Description="Multiplies two numbers", Category="Useful functions")]
85-
public static double MultiplyThem(double v1, double v2)
86-
{
87-
return v1 * v2;
88-
}
89-
}
90-
91-
92-
* Compile TestLib.cs to TestLib.dll: from the command-line:
93-
c:\windows\microsoft.net\framework\v2.0.50727\csc.exe /target:library /reference:ExcelDna.Integration.dll TestLib.cs
94-
95-
* Modify Test1.dna to contain:
96-
97-
<DnaLibrary>
98-
<ExternalLibrary Path="TestLib.dll" />
99-
</DnaLibrary>
100-
101-
* Reload the .xll and check =MultiplyThem(2,3)
102-
* To support .NET 4 assemblies, add a RuntimeVersion="v4.0" attribute to the DnaLibrary tag:
103-
104-
<DnaLibrary RuntimeVersion="v4.0">
105-
<ExternalLibrary Path="TestLib.dll" />
106-
</DnaLibrary>
107-
108-
4. Create an add-in using Visual Studio and the Excel-DNA NuGet package
109-
-----------------------------------------------------------------------
110-
Excel-DNA is also available as a NuGet package. Create a new "Class Library" project (in C#, Visual Basic or F#) and install the "Excel-DNA" package.
111-
The project will be configured as an Excel add-in, with additional information and instructions in the Readme.txt file that is displayed.
112-
113-
5. Additional samples
114-
---------------------
115-
Included in the distribution are various samples in the Distribution\Samples directory. Each sample is a .dna file which can be loaded by putting a renamed copy of ExcelDna.xll in the same directory, where <TheName>.dna must be matched by <TheName>.xll.
116-
117-
6. Getting Support
118-
------------------
119-
The Excel-DNA Google group at https://groups.google.com/forum/#!forum/exceldna is the primary support forum. All questions are welcome.
120-
Formal support agreements for corporate users are also available - see http://excel-dna.net/support/ for details.
1+
Getting started with Excel-DNA
2+
==============================
3+
4+
Do this first:
5+
--------------
6+
7+
* The .NET 2.0 runtime must be installed (or .NET 4 with additional settings).
8+
The .NET Framework Version 2.0 Redistributable Package is available from Microsoft here:
9+
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en
10+
11+
* Macros security in Excel must not be 'Very High' or 'High' (if set to Medium -- it will prompt whether to enable each macro library). To use the .NET macros you will have to 'Enable' at the prompt.
12+
13+
14+
1. Create a user-defined function in Visual Basic
15+
-------------------------------------------------
16+
* Make a copy of ExcelDna.xll in a convenient directory, calling the copy Test1.xll.
17+
* Create a new text file, called Test1.dna (the same prefix as the .xll file), with contents:
18+
19+
<DnaLibrary RuntimeVersion="v2.0" Language="VB">
20+
<![CDATA[
21+
22+
Public Module MyFunctions
23+
24+
Function AddThem(x, y)
25+
AddThem = x + y
26+
End Function
27+
28+
End Module
29+
30+
]]>
31+
</DnaLibrary>
32+
33+
* (To target .NET 4 or .NET 4.5, use RuntimeVersion="V4.0" instead.)
34+
* Load Test1.xll in Excel (either File->Open or Tools->Add-Ins and Browse).
35+
* You should be prompted whether to Enable Macros, click Enable.
36+
* Enter =AddThem(4,2) into a cell - you should get 6.
37+
* There should also be an entry for AddThem in the function wizard, under the category Test1.
38+
39+
Troubleshooting
40+
---------------
41+
* If you are not prompted to Enable Macros and nothing else happens, your security level is probably on High. Set it to Medium.
42+
* If you get a message indicating that the .xll file is not recognized (and even opening it as text), you might not have the .NET Framework 2.0 installed. Install it. Otherwise Excel is using .Net version 1.1 by default. To change this, refer back to the prerequisites section.
43+
* If Excel crashes with an unhandled exception, an access violation or some other horrible error, either during loading or when running the function, please let me know. This shouldn't happen, and I would like to know if it does.
44+
* If a form appears with the title 'ExcelDna Compilation Errors' then there were some errors trying to compile the code in the .dna file. Check that you have put the right code into the .dna file.
45+
* If Excel prompts for Enabling Macros, and then the function does not work and does not appear in the function wizard, you might not have the right filename for the .dna file. The prefix should be the same as the .xll file and it should be in the same directory.
46+
* Otherwise, if something goes wrong, let me know or post to the Google group noted below.
47+
48+
2. Creating a user-defined function in C#
49+
-----------------------------------------
50+
* Change the contents of Test1.dna to:
51+
52+
<DnaLibrary RuntimeVersion="v2.0" Language="CS">
53+
<![CDATA[
54+
55+
using ExcelDna.Integration;
56+
57+
public class MyFunctions
58+
{
59+
[ExcelFunction(Description="Joins a string to a number", Category="Useful functions")]
60+
public static string JoinThem(string str, double val)
61+
{
62+
return str + val;
63+
}
64+
}
65+
66+
]]>
67+
</DnaLibrary>
68+
69+
* Reload the .xll, either from File->Open or in Tools->Add-Ins.
70+
* Check with the formula =JoinThem("abc", 123)
71+
* If the first example worked, this one should too.
72+
73+
3. Making the functions from a compiled library available
74+
---------------------------------------------------------
75+
Excel-DNA can also load any compiled .NET library. Public static functions with a compatible signature are exported to Excel.
76+
77+
* Create a file called TestLib.cs containing the following code:
78+
79+
using ExcelDna.Integration;
80+
81+
public class SomeClass
82+
{
83+
84+
[ExcelFunction(Description="Multiplies two numbers", Category="Useful functions")]
85+
public static double MultiplyThem(double v1, double v2)
86+
{
87+
return v1 * v2;
88+
}
89+
}
90+
91+
92+
* Compile TestLib.cs to TestLib.dll: from the command-line:
93+
c:\windows\microsoft.net\framework\v2.0.50727\csc.exe /target:library /reference:ExcelDna.Integration.dll TestLib.cs
94+
95+
* Modify Test1.dna to contain:
96+
97+
<DnaLibrary>
98+
<ExternalLibrary Path="TestLib.dll" />
99+
</DnaLibrary>
100+
101+
* Reload the .xll and check =MultiplyThem(2,3)
102+
* To support .NET 4 assemblies, add a RuntimeVersion="v4.0" attribute to the DnaLibrary tag:
103+
104+
<DnaLibrary RuntimeVersion="v4.0">
105+
<ExternalLibrary Path="TestLib.dll" />
106+
</DnaLibrary>
107+
108+
4. Create an add-in using Visual Studio and the Excel-DNA NuGet package
109+
-----------------------------------------------------------------------
110+
Excel-DNA is also available as a NuGet package. Create a new "Class Library" project (in C#, Visual Basic or F#) and install the "ExcelDna.AddIn" package.
111+
The project will be configured as an Excel add-in, with additional information and instructions in the Readme.txt file that is displayed.
112+
113+
5. Additional samples
114+
---------------------
115+
Included in the distribution are various samples in the Distribution\Samples directory. Each sample is a .dna file which can be loaded by putting a renamed copy of ExcelDna.xll in the same directory, where <TheName>.dna must be matched by <TheName>.xll.
116+
117+
6. Getting Support
118+
------------------
119+
The Excel-DNA Google group at https://groups.google.com/forum/#!forum/exceldna is the primary support forum. All questions are welcome.
120+
Formal support agreements for corporate users are also available - see http://excel-dna.net/support/ for details.
121121

Distribution/LICENSE.txt

+27-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
Copyright (C) 2005-2014 Govert van Drimmelen
2-
3-
This software is provided 'as-is', without any express or implied
4-
warranty. In no event will the authors be held liable for any damages
5-
arising from the use of this software.
6-
7-
Permission is granted to anyone to use this software for any purpose,
8-
including commercial applications, and to alter it and redistribute it
9-
freely, subject to the following restrictions:
10-
11-
1. The origin of this software must not be misrepresented; you must not
12-
claim that you wrote the original software. If you use this software
13-
in a product, an acknowledgment in the product documentation would be
14-
appreciated but is not required.
15-
2. Altered source versions must be plainly marked as such, and must not be
16-
misrepresented as being the original software.
17-
3. This notice may not be removed or altered from any source distribution.
18-
19-
20-
Govert van Drimmelen
21-
22-
23-
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2005-2015 Govert van Drimmelen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+
23+
24+
Govert van Drimmelen
25+
26+
27+

Package/Excel-DNA.Lib/Excel-DNA.Lib.nuspec

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>Excel-DNA.Lib</id>
5-
<version>0.32.0</version>
5+
<version>0.33.7-rc1</version>
66
<title>Excel-DNA Reference Library</title>
77
<authors>Govert van Drimmelen</authors>
88
<owners>Govert van Drimmelen</owners>
99
<projectUrl>http://excel-dna.net</projectUrl>
1010
<iconUrl>http://docs.excel-dna.net/NuGetIcon.png</iconUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12-
<description>Reference library package for Excel-DNA. Use the main Excel-DNA package to create a new add-in.</description>
12+
<description>Deprecated reference library package for Excel-DNA. Use the package ExcelDna.AddIn to create a new add-in.</description>
1313
<summary>Reference library package for Excel-DNA.</summary>
1414
<tags>excel exceldna udf excel-dna</tags>
15+
<dependencies>
16+
<dependency id="ExcelDna.Integration" version="0.33.7-rc1" />
17+
</dependencies>
1518
</metadata>
16-
<files>
17-
<file src="C:\Work\ExcelDna\Current\Distribution\ExcelDna.Integration.dll" target="lib\ExcelDna.Integration.dll" />
18-
<file src="tools\install.ps1" target="tools\install.ps1" />
19-
</files>
2019
</package>

Package/Excel-DNA/Excel-DNA.nuspec

+4-22
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,18 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>Excel-DNA</id>
5-
<version>0.32.0</version>
5+
<version>0.33.7-rc1</version>
66
<title>Excel-DNA</title>
77
<authors>Govert van Drimmelen</authors>
88
<owners>Govert van Drimmelen</owners>
99
<projectUrl>http://excel-dna.net</projectUrl>
1010
<iconUrl>http://docs.excel-dna.net/NuGetIcon.png</iconUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12-
<description>Excel-DNA eases the development of Excel add-ins using .NET.
13-
Add-ins created with Excel-DNA can export high-performance user-defined functions and macros, and can be packed into a single file for easy distribution and installation.
14-
15-
Excel versions 97 through 2013 can be targeted with a single add-in.
16-
Advanced Excel features are supported, including multi-threaded recalculation (Excel 2007 and later), registration-free RTD servers (Excel 2002 and later) and customized Ribbon and Task Pane interfaces (Excel 2007 and later) and asynchronous functions (Excel 2002 and later).
17-
18-
Excel-DNA supports the .NET runtime version 2.0 (which is used by .NET versions 2.0, 3.0 and 3.5) and version 4.0 (the version number used by .NET 4 and 4.5).
19-
20-
The Excel-Dna Runtime is free for all use, and distributed under a permissive open-source license that also allows commercial use.</description>
12+
<description>This NuGet package is deprecated, and used for compatibility only. The basic Excel-DNA NuGet package is now called ExcelDna.AddIn.</description>
2113
<summary>Excel-DNA is an independent project to integrate .NET into Excel.</summary>
2214
<tags>excel exceldna udf excel-dna</tags>
23-
<dependencies>
24-
<dependency id="Excel-DNA.Lib" version="[0.32.0,0.33)" />
15+
<dependencies>
16+
<dependency id="ExcelDna.AddIn" version="0.33.7-rc1" />
2517
</dependencies>
2618
</metadata>
27-
<files>
28-
<file src="C:\Work\ExcelDna\Current\Distribution\ExcelDna.Integration.dll" target="tools\ExcelDna.Integration.dll" />
29-
<file src="C:\Work\ExcelDna\Current\Distribution\ExcelDna.xll" target="tools\ExcelDna.xll" />
30-
<file src="C:\Work\ExcelDna\Current\Distribution\ExcelDna64.xll" target="tools\ExcelDna64.xll" />
31-
<file src="C:\Work\ExcelDna\Current\Distribution\ExcelDnaPack.exe" target="tools\ExcelDnaPack.exe" />
32-
<file src="content\ExcelDna-Template.dna" target="content\ExcelDna-Template.dna" />
33-
<file src="tools\install.ps1" target="tools\install.ps1" />
34-
<file src="tools\uninstall.ps1" target="tools\uninstall.ps1" />
35-
<file src="readme.txt" target="readme.txt" />
36-
</files>
3719
</package>

0 commit comments

Comments
 (0)