Skip to content

Commit 45b8a21

Browse files
author
Doug Schmidt
authored
Merge pull request #305 from DougSchmidt-AI/feature/PF-1423-ExcelCsvExtractor
PF-1423 - Added ExcelCsvExtractor tool
2 parents a4886ec + f64b04d commit 45b8a21

15 files changed

+1093
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
</configuration>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
3+
namespace ExcelCsvExtractor
4+
{
5+
public class Context
6+
{
7+
public string ExcelPath { get; set; }
8+
public List<string> Sheets { get; } = new List<string>();
9+
public string OutputPath { get; set; }
10+
public bool Overwrite { get; set; }
11+
public string DateTimeFormat { get; set; }
12+
public bool TrimEmptyColumns { get; set; } = true;
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{657DC627-59D4-4910-B723-C7BE8A70B43B}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<RootNamespace>ExcelCsvExtractor</RootNamespace>
11+
<AssemblyName>ExcelCsvExtractor</AssemblyName>
12+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<Deterministic>true</Deterministic>
16+
<NuGetPackageImportStamp>
17+
</NuGetPackageImportStamp>
18+
<PublishUrl>publish\</PublishUrl>
19+
<Install>true</Install>
20+
<InstallFrom>Disk</InstallFrom>
21+
<UpdateEnabled>false</UpdateEnabled>
22+
<UpdateMode>Foreground</UpdateMode>
23+
<UpdateInterval>7</UpdateInterval>
24+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
25+
<UpdatePeriodically>false</UpdatePeriodically>
26+
<UpdateRequired>false</UpdateRequired>
27+
<MapFileExtensions>true</MapFileExtensions>
28+
<ApplicationRevision>0</ApplicationRevision>
29+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
30+
<IsWebBootstrapper>false</IsWebBootstrapper>
31+
<UseApplicationTrust>false</UseApplicationTrust>
32+
<BootstrapperEnabled>true</BootstrapperEnabled>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
35+
<PlatformTarget>AnyCPU</PlatformTarget>
36+
<DebugSymbols>true</DebugSymbols>
37+
<DebugType>full</DebugType>
38+
<Optimize>false</Optimize>
39+
<OutputPath>bin\Debug\</OutputPath>
40+
<DefineConstants>DEBUG;TRACE</DefineConstants>
41+
<ErrorReport>prompt</ErrorReport>
42+
<WarningLevel>4</WarningLevel>
43+
</PropertyGroup>
44+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
45+
<PlatformTarget>AnyCPU</PlatformTarget>
46+
<DebugType>pdbonly</DebugType>
47+
<Optimize>true</Optimize>
48+
<OutputPath>bin\Release\</OutputPath>
49+
<DefineConstants>TRACE</DefineConstants>
50+
<ErrorReport>prompt</ErrorReport>
51+
<WarningLevel>4</WarningLevel>
52+
</PropertyGroup>
53+
<ItemGroup>
54+
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
55+
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
56+
</Reference>
57+
<Reference Include="ExcelDataReader, Version=3.6.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL">
58+
<HintPath>..\packages\ExcelDataReader.3.6.0\lib\net45\ExcelDataReader.dll</HintPath>
59+
</Reference>
60+
<Reference Include="ExcelDataReader.DataSet, Version=3.6.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL">
61+
<HintPath>..\packages\ExcelDataReader.DataSet.3.6.0\lib\net35\ExcelDataReader.DataSet.dll</HintPath>
62+
</Reference>
63+
<Reference Include="Humanizer, Version=2.14.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
64+
<HintPath>..\packages\Humanizer.Core.2.14.1\lib\netstandard2.0\Humanizer.dll</HintPath>
65+
</Reference>
66+
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
67+
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
68+
</Reference>
69+
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
70+
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
71+
<Private>True</Private>
72+
<Private>True</Private>
73+
</Reference>
74+
<Reference Include="System" />
75+
<Reference Include="System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
76+
<HintPath>..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
77+
<Private>True</Private>
78+
<Private>True</Private>
79+
</Reference>
80+
<Reference Include="System.ComponentModel.Composition" />
81+
<Reference Include="System.Configuration" />
82+
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
83+
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
84+
<Private>True</Private>
85+
<Private>True</Private>
86+
</Reference>
87+
<Reference Include="System.Core" />
88+
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
89+
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
90+
</Reference>
91+
<Reference Include="System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
92+
<HintPath>..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll</HintPath>
93+
<Private>True</Private>
94+
<Private>True</Private>
95+
</Reference>
96+
<Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
97+
<HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
98+
<Private>True</Private>
99+
<Private>True</Private>
100+
</Reference>
101+
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
102+
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
103+
<Private>True</Private>
104+
<Private>True</Private>
105+
</Reference>
106+
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
107+
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
108+
<Private>True</Private>
109+
<Private>True</Private>
110+
</Reference>
111+
<Reference Include="System.IO.Compression.FileSystem" />
112+
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
113+
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
114+
<Private>True</Private>
115+
<Private>True</Private>
116+
</Reference>
117+
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
118+
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
119+
<Private>True</Private>
120+
<Private>True</Private>
121+
</Reference>
122+
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
123+
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
124+
<Private>True</Private>
125+
<Private>True</Private>
126+
</Reference>
127+
<Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
128+
<HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
129+
<Private>True</Private>
130+
<Private>True</Private>
131+
</Reference>
132+
<Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
133+
<HintPath>..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
134+
<Private>True</Private>
135+
<Private>True</Private>
136+
</Reference>
137+
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
138+
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
139+
<Private>True</Private>
140+
<Private>True</Private>
141+
</Reference>
142+
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
143+
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
144+
<Private>True</Private>
145+
<Private>True</Private>
146+
</Reference>
147+
<Reference Include="System.Numerics" />
148+
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
149+
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
150+
<Private>True</Private>
151+
<Private>True</Private>
152+
</Reference>
153+
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
154+
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
155+
<Private>True</Private>
156+
<Private>True</Private>
157+
</Reference>
158+
<Reference Include="System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
159+
<HintPath>..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
160+
<Private>True</Private>
161+
<Private>True</Private>
162+
</Reference>
163+
<Reference Include="System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
164+
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
165+
<Private>True</Private>
166+
<Private>True</Private>
167+
</Reference>
168+
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
169+
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
170+
<Private>True</Private>
171+
<Private>True</Private>
172+
</Reference>
173+
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
174+
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
175+
<Private>True</Private>
176+
<Private>True</Private>
177+
</Reference>
178+
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
179+
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
180+
<Private>True</Private>
181+
<Private>True</Private>
182+
</Reference>
183+
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
184+
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
185+
<Private>True</Private>
186+
<Private>True</Private>
187+
</Reference>
188+
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
189+
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
190+
<Private>True</Private>
191+
<Private>True</Private>
192+
</Reference>
193+
<Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
194+
<HintPath>..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
195+
<Private>True</Private>
196+
<Private>True</Private>
197+
</Reference>
198+
<Reference Include="System.Web" />
199+
<Reference Include="System.Xml" />
200+
<Reference Include="System.Xml.Linq" />
201+
<Reference Include="System.Data.DataSetExtensions" />
202+
<Reference Include="Microsoft.CSharp" />
203+
<Reference Include="System.Data" />
204+
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
205+
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
206+
<Private>True</Private>
207+
<Private>True</Private>
208+
</Reference>
209+
</ItemGroup>
210+
<ItemGroup>
211+
<Compile Include="Context.cs" />
212+
<Compile Include="ExpectedException.cs" />
213+
<Compile Include="Option.cs" />
214+
<Compile Include="Program.cs" />
215+
<Compile Include="Properties\AssemblyInfo.cs" />
216+
<Compile Include="Splitter.cs" />
217+
</ItemGroup>
218+
<ItemGroup>
219+
<None Include="App.config" />
220+
<EmbeddedResource Include="log4net.config" />
221+
<None Include="packages.config" />
222+
<None Include="Readme.md" />
223+
</ItemGroup>
224+
<ItemGroup>
225+
<Content Include="FodyWeavers.xml" />
226+
</ItemGroup>
227+
<ItemGroup>
228+
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
229+
<Visible>False</Visible>
230+
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
231+
<Install>true</Install>
232+
</BootstrapperPackage>
233+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
234+
<Visible>False</Visible>
235+
<ProductName>.NET Framework 3.5 SP1</ProductName>
236+
<Install>false</Install>
237+
</BootstrapperPackage>
238+
</ItemGroup>
239+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
240+
<Import Project="..\packages\Fody.6.5.5\build\Fody.targets" Condition="Exists('..\packages\Fody.6.5.5\build\Fody.targets')" />
241+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
242+
<PropertyGroup>
243+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
244+
</PropertyGroup>
245+
<Error Condition="!Exists('..\packages\Fody.6.5.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.5.5\build\Fody.targets'))" />
246+
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
247+
</Target>
248+
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
249+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
3+
namespace ExcelCsvExtractor
4+
{
5+
public class ExpectedException : Exception
6+
{
7+
public ExpectedException(string message)
8+
: base(message)
9+
{
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2+
<Costura />
3+
</Weavers>

0 commit comments

Comments
 (0)