-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
113 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="ExcelDnaProps"> | ||
<!-- | ||
If you change properties in this file, they may not come into effect until you: | ||
* Rebuild the solution/project | ||
or | ||
* Close Visual Studio | ||
* Delete .vs folder, if exists | ||
* Delete ProjectName.csproj.user (or equivalent for VB, F#, etc.), if exists | ||
* Delete SolutionName.suo, if exists | ||
* Open your solution/project again in Visual Studio | ||
--> | ||
|
||
<!-- | ||
Configuration properties for building .dna files | ||
--> | ||
<PropertyGroup> | ||
<!-- | ||
Enable/Disable automatic generation of platform-specific versions of .dna files | ||
--> | ||
<ExcelDnaCreate32BitAddIn Condition="'$(ExcelDnaCreate32BitAddIn)' == ''">true</ExcelDnaCreate32BitAddIn> | ||
<ExcelDnaCreate64BitAddIn Condition="'$(ExcelDnaCreate64BitAddIn)' == ''">true</ExcelDnaCreate64BitAddIn> | ||
|
||
<!-- | ||
Define the suffix used for each platform-specific file e.g. MyAddIn64.dna | ||
--> | ||
<ExcelDna32BitAddInSuffix Condition="'$(ExcelDna32BitAddInSuffix)' == ''"></ExcelDna32BitAddInSuffix> | ||
<ExcelDna64BitAddInSuffix Condition="'$(ExcelDna64BitAddInSuffix)' == ''">64</ExcelDna64BitAddInSuffix> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Configuration properties for packing .dna files | ||
--> | ||
<PropertyGroup> | ||
<!-- | ||
Enable/Disable packing of .dna files | ||
--> | ||
<RunExcelDnaPack Condition="'$(RunExcelDnaPack)' == ''">true</RunExcelDnaPack> | ||
|
||
<!-- | ||
Suffix used for packed .xll files e.g. MyAddIn-packed.xll | ||
--> | ||
<ExcelDnaPackXllSuffix Condition="'$(ExcelDnaPackXllSuffix)' == ''">-packed</ExcelDnaPackXllSuffix> | ||
</PropertyGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using ExcelDna.Integration; | ||
using ExcelDna.IntelliSense; | ||
|
||
namespace ExcelGenericUDF.Stringa | ||
{ | ||
public class Concatenate | ||
{ | ||
[ExcelFunction(Name = Udf.nome + ".Stringa.ConcatenateMultiple", Description = "Concatenate adiacent cells")] | ||
public static string ConcatenateMultiple( | ||
[ExcelArgument(Name = "Concatenate Range", Description = "Select multiple cell to concanenate")] object[] Range, | ||
[ExcelArgument(Name = "Separator", Description = "Separator String")] string Separator, | ||
[ExcelArgument(Name = "Include Empty", Description = "if true show empty cells")] bool Empty) | ||
{ | ||
try | ||
{ | ||
string s = ""; | ||
|
||
foreach (var cell in Range) | ||
{ | ||
if (cell is ExcelEmpty && Empty) | ||
s += "" + Separator; | ||
else if (cell is ExcelEmpty && Empty == false) { | ||
|
||
} | ||
else | ||
s += cell + Separator; | ||
} | ||
|
||
return s.Substring(0, s.Length - Separator.Length); | ||
} | ||
catch (Exception e) | ||
{ | ||
return e.ToString(); | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Excel-DNA" version="0.33.9" targetFramework="net452" /> | ||
<package id="ExcelDna.AddIn" version="0.33.9" targetFramework="net452" /> | ||
<package id="ExcelDna.Integration" version="0.33.9" targetFramework="net452" /> | ||
<package id="ExcelDna.IntelliSense" version="1.0.0" targetFramework="net452" /> | ||
<package id="Excel-DNA" version="0.34.6" targetFramework="net452" /> | ||
<package id="ExcelDna.AddIn" version="0.34.6" targetFramework="net452" /> | ||
<package id="ExcelDna.Integration" version="0.34.6" targetFramework="net452" /> | ||
<package id="ExcelDna.IntelliSense" version="1.1.0" targetFramework="net452" /> | ||
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1000" targetFramework="net452" /> | ||
<package id="UIAComWrapper" version="1.1.0.14" targetFramework="net452" /> | ||
</packages> |