Naethra D avatar Naethra D committed 3ee1b94

Code: Web Client

Comments (0)

Files changed (228)

Source/WebClient/Database/Database.sqlproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <Name>Database</Name>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectVersion>4.0</ProjectVersion>
+    <ProjectGuid>{2eff002e-1a4a-481d-a5df-9b43ddd85b89}</ProjectGuid>
+    <DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>
+    <ShowWizard>False</ShowWizard>
+    <OutputType>Database</OutputType>
+    <RootPath>
+    </RootPath>
+    <RootNamespace>Database</RootNamespace>
+    <AssemblyName>Database</AssemblyName>
+    <IncludeSchemaNameInFileName>False</IncludeSchemaNameInFileName>
+    <GenerateDatabaseFile>False</GenerateDatabaseFile>
+    <GenerateCreateScript>False</GenerateCreateScript>
+    <ModelCollation>1033, CI</ModelCollation>
+    <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
+    <DeployToDatabase>True</DeployToDatabase>
+    <DeployToDatabaseAddToServerExplorer>True</DeployToDatabaseAddToServerExplorer>
+    <LoadSqlClrTypes>True</LoadSqlClrTypes>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetLanguage>CS</TargetLanguage>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <DefaultSchema>dbo</DefaultSchema>
+    <PreviousProjectVersion>4.0</PreviousProjectVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+    <SuppressWarnings>
+    </SuppressWarnings>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <DefineDebug>false</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TargetConnectionString>
+    </TargetConnectionString>
+    <TargetDatabase>
+    </TargetDatabase>
+    <SqlServerVerification>True</SqlServerVerification>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <SuppressWarnings>
+    </SuppressWarnings>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <DefineDebug>true</DefineDebug>
+    <DefineTrace>true</DefineTrace>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TargetConnectionString>
+    </TargetConnectionString>
+    <TargetDatabase>
+    </TargetDatabase>
+    <SqlServerVerification>True</SqlServerVerification>
+  </PropertyGroup>
+  <!-- VS10 without SP1 will not have VisualStudioVersion set, so do that here -->
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
+  <ItemGroup>
+    <Folder Include="Properties" />
+    <Folder Include="dbo" />
+    <Folder Include="dbo\tables" />
+  </ItemGroup>
+  <ItemGroup>
+    <BuildContributorArgument Include="OutDir=$(OutDir)" />
+  </ItemGroup>
+  <ItemGroup>
+    <Build Include="dbo\tables\DocumentStore.sql" />
+    <Build Include="dbo\tables\User.sql" />
+  </ItemGroup>
+</Project>

Source/WebClient/Database/dbo/tables/DocumentStore.sql

+CREATE TABLE [dbo].[DocumentStore]
+(
+    [Id] INT IDENTITY(1,1) NOT NULL , 
+    [Title] NVARCHAR(1000) NOT NULL, 
+    [Description] NVARCHAR(MAX) NULL, 
+    [Size] FLOAT NOT NULL, 
+    [Status] NVARCHAR(200) NOT NULL, 
+    [Metadata] NVARCHAR(MAX) NULL, 
+    [Identifier] NVARCHAR(150) NULL, 
+    [Citation] NVARCHAR(1000) NULL, 
+    [UserId] INT NOT NULL, 
+    [Filename] NVARCHAR(1000) NOT NULL, 
+    [FileData] VARBINARY(MAX) NULL, 
+    [FileId] NVARCHAR(200) NULL, 
+    [UploadedDate] DATETIME NULL, 
+    [MimeType] NVARCHAR(200) NULL, 
+    CONSTRAINT [FK_DocumentStore_User] FOREIGN KEY ([UserId]) REFERENCES [User]([Id]), 
+    CONSTRAINT [PK_DocumentStore] PRIMARY KEY ([Id])
+)

Source/WebClient/Database/dbo/tables/User.sql

+CREATE TABLE [dbo].[User](
+	[Id] [int] NOT NULL IDENTITY(1,1),
+	[NameIdentifier] [varchar](100) NOT NULL,
+	[IdentityProvider] [varchar](20) NOT NULL,
+	[FirstName] [nvarchar](150) NOT NULL,
+	[LastName] [nvarchar](150) NOT NULL,
+	[Organization] [nvarchar](150) NULL,
+	[EmailId] [nvarchar](100) NOT NULL,
+	[MiddleName] [nvarchar](150) NULL,
+	CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED ([Id] ASC)
+)

Source/WebClient/Web.Azure/Profiles/datauptest.azurePubxml

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <AzureCredentials>dataupdevelopment</AzureCredentials>
+    <AzureHostedServiceName>datauptesting</AzureHostedServiceName>
+    <AzureHostedServiceLabel>datauptesting</AzureHostedServiceLabel>
+    <AzureSlot>Production</AzureSlot>
+    <AzureEnableIntelliTrace>False</AzureEnableIntelliTrace>
+    <AzureEnableProfiling>False</AzureEnableProfiling>
+    <AzureEnableWebDeploy>False</AzureEnableWebDeploy>
+    <AzureStorageAccountName>dcxldevelopment</AzureStorageAccountName>
+    <AzureStorageAccountLabel>dcxldevelopment</AzureStorageAccountLabel>
+    <AzureDeploymentLabel>datauptest</AzureDeploymentLabel>
+    <AzureSolutionConfiguration>Release</AzureSolutionConfiguration>
+    <AzureServiceConfiguration>datauptest</AzureServiceConfiguration>
+    <AzureAppendTimestampToDeploymentLabel>True</AzureAppendTimestampToDeploymentLabel>
+    <AzureEnableRemoteDesktop>True</AzureEnableRemoteDesktop>
+    <AzureDeploymentReplacementMethod>AutomaticUpgrade</AzureDeploymentReplacementMethod>
+  </PropertyGroup>
+</Project>

Source/WebClient/Web.Azure/Profiles/dcxlstagingDevelopment.azurePubxml

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <AzureCredentials>dataupdevelopment</AzureCredentials>
+    <AzureHostedServiceName>dcxldevelopment</AzureHostedServiceName>
+    <AzureHostedServiceLabel>dcxldevelopment</AzureHostedServiceLabel>
+    <AzureSlot>Production</AzureSlot>
+    <AzureEnableIntelliTrace>False</AzureEnableIntelliTrace>
+    <AzureEnableProfiling>False</AzureEnableProfiling>
+    <AzureEnableWebDeploy>False</AzureEnableWebDeploy>
+    <AzureStorageAccountName>dcxldevelopment</AzureStorageAccountName>
+    <AzureStorageAccountLabel>dcxldevelopment</AzureStorageAccountLabel>
+    <AzureDeploymentLabel>dcxldev</AzureDeploymentLabel>
+    <AzureSolutionConfiguration>Release</AzureSolutionConfiguration>
+    <AzureServiceConfiguration>dcxlDevelopment</AzureServiceConfiguration>
+    <AzureAppendTimestampToDeploymentLabel>True</AzureAppendTimestampToDeploymentLabel>
+    <AzureEnableRemoteDesktop>False</AzureEnableRemoteDesktop>
+    <AzureDeploymentReplacementMethod>AutomaticUpgrade</AzureDeploymentReplacementMethod>
+  </PropertyGroup>
+</Project>

Source/WebClient/Web.Azure/Profiles/dcxlstagingProduction.azurePubxml

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <AzureCredentials>dataupdevelopment</AzureCredentials>
+    <AzureHostedServiceName>dcxlstaging</AzureHostedServiceName>
+    <AzureHostedServiceLabel>dcxlstaging</AzureHostedServiceLabel>
+    <AzureSlot>Production</AzureSlot>
+    <AzureEnableIntelliTrace>False</AzureEnableIntelliTrace>
+    <AzureEnableProfiling>False</AzureEnableProfiling>
+    <AzureEnableWebDeploy>False</AzureEnableWebDeploy>
+    <AzureStorageAccountName>dcxlstaging</AzureStorageAccountName>
+    <AzureStorageAccountLabel>dcxlstaging</AzureStorageAccountLabel>
+    <AzureDeploymentLabel>dcxlstaging</AzureDeploymentLabel>
+    <AzureSolutionConfiguration>Release</AzureSolutionConfiguration>
+    <AzureServiceConfiguration>dcxlStaging</AzureServiceConfiguration>
+    <AzureAppendTimestampToDeploymentLabel>True</AzureAppendTimestampToDeploymentLabel>
+    <AzureEnableRemoteDesktop>False</AzureEnableRemoteDesktop>
+    <AzureDeploymentReplacementMethod>AutomaticUpgrade</AzureDeploymentReplacementMethod>
+  </PropertyGroup>
+</Project>

Source/WebClient/Web.Azure/ServiceConfiguration.Cloud.cscfg

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceConfiguration serviceName="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
+  <Role name="Web.Client">
+    <Instances count="1" />
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" value="true" />
+      <Setting name="PrimaryContainer" value="dataupfiles" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=datatupstorage;AccountKey=JNP40XUjm6C+0pXYmtTMx7MSKg2+bbjUUjj8usDi8rEE9Z6VGy9iQ5kGwcpmmXcLkw8VsROwzPFRt97lafs9+A==" />
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:v12h47zv64.database.windows.net;initial catalog=dataupclient;persist security info=True;user id=dataup;password=LakeMerritt!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="ClientValidationEnabled" value="true" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
+      <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="https://dataupadminservice.cloudapp.net/RepositoryService" />
+      <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
+      <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
+      <Setting name="Profile_Identifier" value="oneshare_ark_only" />
+      <Setting name="Profile_Post" value="oneshare_dataup_content" />
+      <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
+    </ConfigurationSettings>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" thumbprint="D7D32A9B4FF37934D2E9E6BB2DF355CA4CE176F1" thumbprintAlgorithm="sha1" />
+    </Certificates>
+  </Role>
+</ServiceConfiguration>

Source/WebClient/Web.Azure/ServiceConfiguration.Local.cscfg

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceConfiguration serviceName="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
+  <Role name="Web.Client">
+    <Instances count="1" />
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" value="true" />
+      <Setting name="PrimaryContainer" value="dcxlcontainer" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dcxldevelopment;AccountKey=GyoG7buqRTJ3qmbGv5hAVqqTjlne8G0vDVuDrokj41oouqnTvdxuCcGjNCwW4KykdPWmkx55XU8GHy13EZlMmg==" />
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=datauptest;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="ClientValidationEnabled" value="true" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
+      <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="http://adminservicedev.cloudapp.net/" />
+      <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
+      <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
+      <Setting name="Profile_Identifier" value="dcxl_ark_only" />
+      <Setting name="Profile_Post" value="dcxl_dataup_content" />
+      <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
+    </ConfigurationSettings>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" thumbprint="D7D32A9B4FF37934D2E9E6BB2DF355CA4CE176F1" thumbprintAlgorithm="sha1" />
+    </Certificates>
+  </Role>
+</ServiceConfiguration>

Source/WebClient/Web.Azure/ServiceConfiguration.datauptest.cscfg

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceConfiguration serviceName="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
+  <Role name="Web.Client">
+    <Instances count="1" />
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" value="true" />
+      <Setting name="PrimaryContainer" value="dcxlcontainer" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dcxldevelopment;AccountKey=GyoG7buqRTJ3qmbGv5hAVqqTjlne8G0vDVuDrokj41oouqnTvdxuCcGjNCwW4KykdPWmkx55XU8GHy13EZlMmg==" />
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=datauptest;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="ClientValidationEnabled" value="true" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
+      <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="http://adminservicetest.cloudapp.net/RepositoryService/" />
+      <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
+      <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
+      <Setting name="Profile_Identifier" value="dcxl_ark_only" />
+      <Setting name="Profile_Post" value="dcxl_dataup_content" />
+      <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
+    </ConfigurationSettings>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" thumbprint="D7D32A9B4FF37934D2E9E6BB2DF355CA4CE176F1" thumbprintAlgorithm="sha1" />
+    </Certificates>
+  </Role>
+</ServiceConfiguration>

Source/WebClient/Web.Azure/ServiceConfiguration.dcxlDevelopment.cscfg

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceConfiguration serviceName="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
+  <Role name="Web.Client">
+    <Instances count="1" />
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" value="true" />
+      <Setting name="PrimaryContainer" value="dcxlcontainer" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dcxldevelopment;AccountKey=GyoG7buqRTJ3qmbGv5hAVqqTjlne8G0vDVuDrokj41oouqnTvdxuCcGjNCwW4KykdPWmkx55XU8GHy13EZlMmg==" />
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=datauptest;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="ClientValidationEnabled" value="true" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
+      <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="https://adminservicedev.cloudapp.net/RepositoryService" />
+      <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
+      <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
+      <Setting name="Profile_Identifier" value="oneshare_ark_only" />
+      <Setting name="Profile_Post" value="oneshare_dataup_content" />
+      <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
+    </ConfigurationSettings>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" thumbprint="D7D32A9B4FF37934D2E9E6BB2DF355CA4CE176F1" thumbprintAlgorithm="sha1" />
+    </Certificates>
+  </Role>
+</ServiceConfiguration>

Source/WebClient/Web.Azure/ServiceConfiguration.dcxlStaging.cscfg

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceConfiguration serviceName="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*" schemaVersion="2012-05.1.7">
+  <Role name="Web.Client">
+    <Instances count="1" />
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" value="true" />
+      <Setting name="PrimaryContainer" value="dcxlcontainer" />
+      <Setting name="DataUpStorage" value="DefaultEndpointsProtocol=https;AccountName=dcxlstaging;AccountKey=2M92mz/5sJYtaFoHWMHzXrW+LxxtfpytsfTm5sTWobvg1VGT2TGVeVTM64xgmGNMRvYowevMBpEwMQ3VW1NN4Q==" />
+      <!--<Setting name="DCXLEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=dcxlstaging1;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" /> -->
+      <Setting name="DataUpEntities" value="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:uakxp9zd12.database.windows.net;initial catalog=dataupstagingjul19;persist security info=True;user id=datacuration;password=dcxl2012!;multipleactiveresultsets=True;App=EntityFramework&quot;" />
+      <Setting name="ClientValidationEnabled" value="true" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" value="true" />
+      <Setting name="FederationMetadataLocation" value="https://dcxlstaging.accesscontrol.windows.net/FederationMetadata/2007-06/FederationMetadata.xml" />
+      <Setting name="DataUpWebServiceLink" value="http://adminservicedev.cloudapp.net/RepositoryService/" />
+      <Setting name="Reg" value="[&lt;&gt;\?\@\\''\\;\\$\\!\\#\\(\\)\\^\\&amp;\\{\\}\\+\\-\\.\\~\\/\\%\\*\\\&quot;/\|]+" />
+      <Setting name="Reg2" value="[&lt;&gt;\⌂\\Ç\\ü\\é\\Æ\\£\\¥\\ó\\ú\\Ñ\\¿\\⌐\\½\\¼\\«\\»\\│\\ß\\µ\\±\\°\\∙\\€\\†\\‡\\Š\\™\\œ\\Ÿ\\©\\®\\Ã\\Î\\Ô\\×\\÷\\ø\\þ\/\|]+" />
+      <Setting name="Profile_Identifier" value="dcxl_ark_only" />
+      <Setting name="Profile_Post" value="dcxl_dataup_content" />
+      <Setting name="DemoVideoUrl" value="https://adminservicedev.blob.core.windows.net/demo/dataup-web.wmv" />
+    </ConfigurationSettings>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" thumbprint="D7D32A9B4FF37934D2E9E6BB2DF355CA4CE176F1" thumbprintAlgorithm="sha1" />
+    </Certificates>
+  </Role>
+</ServiceConfiguration>

Source/WebClient/Web.Azure/ServiceDefinition.build.csdef

+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  **********************************************************************************************
+
+  This file was generated by a tool from the project file: ServiceDefinition.csdef
+
+  Changes to this file may cause incorrect behavior and will be lost if the file is regenerated.
+
+  **********************************************************************************************
+-->
+<ServiceDefinition name="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
+  <WebRole name="Web.Client" vmsize="Medium">
+    <Sites>
+      <Site name="Web">
+        <Bindings>
+          <Binding name="Endpoint2" endpointName="Endpoint2" />
+        </Bindings>
+      </Site>
+    </Sites>
+    <Endpoints>
+      <InputEndpoint name="Endpoint2" protocol="https" port="443" certificate="DataUpCertficiate" />
+    </Endpoints>
+    <Imports></Imports>
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" />
+      <Setting name="PrimaryContainer" />
+      <Setting name="DataUpStorage" />
+      <Setting name="DataUpEntities" />
+      <Setting name="ClientValidationEnabled" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" />
+      <Setting name="FederationMetadataLocation" />
+      <Setting name="DataUpWebServiceLink" />
+      <Setting name="Reg" />
+      <Setting name="Reg2" />
+      <Setting name="Profile_Identifier" />
+      <Setting name="Profile_Post" />
+      <Setting name="DemoVideoUrl" />
+    </ConfigurationSettings>
+    <LocalResources></LocalResources>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" storeLocation="LocalMachine" storeName="My" />
+    </Certificates>
+  </WebRole>
+</ServiceDefinition>

Source/WebClient/Web.Azure/ServiceDefinition.csdef

+<?xml version="1.0" encoding="utf-8"?>
+<ServiceDefinition name="Web.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
+  <WebRole name="Web.Client" vmsize="Medium">
+    <Sites>
+      <Site name="Web">
+        <Bindings>
+          <Binding name="Endpoint2" endpointName="Endpoint2" />
+        </Bindings>
+      </Site>
+    </Sites>
+    <Endpoints>
+      <InputEndpoint name="Endpoint2" protocol="https" port="443" certificate="DataUpCertficiate" />
+    </Endpoints>
+    <Imports>
+    </Imports>
+    <ConfigurationSettings>
+      <Setting name="UploadToAzure" />
+      <Setting name="PrimaryContainer" />
+      <Setting name="DataUpStorage" />
+      <Setting name="DataUpEntities" />
+      <Setting name="ClientValidationEnabled" />
+      <Setting name="UnobtrusiveJavaScriptEnabled" />
+      <Setting name="FederationMetadataLocation" />
+      <Setting name="DataUpWebServiceLink" />
+      <Setting name="Reg" />
+      <Setting name="Reg2" />
+      <Setting name="Profile_Identifier" />
+      <Setting name="Profile_Post" />
+      <Setting name="DemoVideoUrl" />
+    </ConfigurationSettings>
+    <LocalResources>
+    </LocalResources>
+    <Certificates>
+      <Certificate name="DataUpCertficiate" storeLocation="LocalMachine" storeName="My" />
+    </Certificates>
+  </WebRole>
+</ServiceDefinition>

Source/WebClient/Web.Azure/Web.Azure.ccproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>1.7</ProductVersion>
+    <ProjectGuid>{59e377e6-1506-4f74-aa0c-95f8f44e19fe}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Web.Azure</RootNamespace>
+    <AssemblyName>Web.Azure</AssemblyName>
+    <StartDevelopmentStorage>True</StartDevelopmentStorage>
+    <Name>Web.Azure</Name>
+    <UseIISExpressByDefault>False</UseIISExpressByDefault>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <!-- Items for the project -->
+  <ItemGroup>
+    <ServiceDefinition Include="ServiceDefinition.csdef" />
+    <ServiceConfiguration Include="ServiceConfiguration.dcxlStaging.cscfg" />
+    <ServiceConfiguration Include="ServiceConfiguration.dcxlDevelopment.cscfg" />
+    <ServiceConfiguration Include="ServiceConfiguration.datauptest.cscfg" />
+    <ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
+    <ServiceConfiguration Include="ServiceConfiguration.Cloud.cscfg" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Web.Client\Web.Client.csproj">
+      <Name>Web.Client</Name>
+      <Project>{d3df26b0-a092-4e60-9851-50a2f8b5e248}</Project>
+      <Private>True</Private>
+      <RoleType>Web</RoleType>
+      <RoleName>Web.Client</RoleName>
+      <UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Profiles" />
+  </ItemGroup>
+  <ItemGroup>
+    <PublishProfile Include="Profiles\dcxlstagingProduction.azurePubxml" />
+    <PublishProfile Include="Profiles\dcxlstagingDevelopment.azurePubxml" />
+    <PublishProfile Include="Profiles\datauptest.azurePubxml" />
+  </ItemGroup>
+  <!-- Import the target files for this project template -->
+  <PropertyGroup>
+    <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
+    <CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.7\</CloudExtensionsDir>
+  </PropertyGroup>
+  <Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
+</Project>

Source/WebClient/Web.Azure/Web.Azure.ccproj.user

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ActivePublishProfile>dcxlstagingDevelopment</ActivePublishProfile>
+    <DeploymentPromptBeforeUpgrading>False</DeploymentPromptBeforeUpgrading>
+    <WebRoleSkipLaunchInBrowser>Web.Client</WebRoleSkipLaunchInBrowser>
+    <PackageProfile>Cloud</PackageProfile>
+    <PackageSolutionConfiguration>Release</PackageSolutionConfiguration>
+    <PackageEnableRemoteDesktop>False</PackageEnableRemoteDesktop>
+  </PropertyGroup>
+</Project>

Source/WebClient/Web.BizLogic/CustomCertificatePolicy.cs

+// -----------------------------------------------------------------------
+// <copyright file="CustomCertificatePolicy.cs" company="">
+// TODO: Update copyright text.
+// </copyright>
+// -----------------------------------------------------------------------
+
+namespace DataUp.Web.BizLogic
+{
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
+    using System.Text;
+    using System.Net;
+
+    /// <summary>
+    /// TODO: Update summary.
+    /// </summary>
+    public class CustomCertificatePolicy : ICertificatePolicy
+    {
+        public bool CheckValidationResult(ServicePoint srvPoint, System.Security.Cryptography.X509Certificates.X509Certificate certificate, WebRequest request, int certificateProblem)
+        {
+            return true;
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/DataDetailExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using DataUp.Web.DataLayer;
+
+namespace DataUp.Web.BizLogic
+{
+    /// <summary>
+    /// Extension for DataDetail object that represents a uploaded file.
+    /// </summary>
+    public static class DataDetailExtension
+    {
+        public static void SetValuesFrom(this DataDetail dataDetail, DocumentStore document)
+        {
+            if (dataDetail != null && document != null)
+            {
+                dataDetail.AzureId = Guid.Parse(document.FileId);
+                dataDetail.FileName = document.Filename;
+                dataDetail.Size = document.Size;
+                dataDetail.MimeType = document.MimeType;
+            }
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/DocumentDetailExtension.cs

+
+using System;
+using DataUp.Web.Common;
+using DataUp.Web.DataLayer;
+
+namespace DataUp.Web.BizLogic
+{
+    /// <summary>
+    /// Extension for DocumentDetail object that represents a document.
+    /// </summary>
+    public static class DocumentDetailExtension
+    {
+        public static void SetValuesFrom(this DocumentDetail documentDetail, DocumentStore document)
+        {
+            if (documentDetail != null && document != null)
+            {
+                documentDetail.Id = document.Id;
+                documentDetail.Citation = document.Citation;
+                documentDetail.Description = document.Description;
+                documentDetail.CreatedById = document.UserId;
+                documentDetail.FileName = document.Filename;
+                documentDetail.Identifier = document.Identifier;
+                documentDetail.Metadata = document.Metadata;
+                documentDetail.Title = document.Title;
+                documentDetail.CreatedDateTime = document.UploadedDate;
+                documentDetail.Status = document.Status.ToEnum<string, DocumentStatus>(DocumentStatus.Uploaded);
+
+                documentDetail.Data = new DataDetail();
+                documentDetail.Data.SetValuesFrom(document);
+            }
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/DocumentStoreExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using DataUp.Web.DataLayer;
+using DataUp.Web.Common;
+
+namespace DataUp.Web.BizLogic
+{
+    /// <summary>
+    /// Extension methods to GET/SET values for DocumentStore.
+    /// </summary>
+    public static class DocumentStoreExtension
+    {
+        public static void SetValuesFrom(this DocumentStore thisObject, DocumentDetail documentDetail)
+        {
+            if (thisObject != null && documentDetail != null)
+            {
+                thisObject.Citation = documentDetail.Citation;
+                thisObject.Description = documentDetail.Description;
+                thisObject.Identifier = documentDetail.Identifier;
+                thisObject.Title = documentDetail.Title;
+                thisObject.Status = documentDetail.Status.ToString();
+
+                if (!string.IsNullOrWhiteSpace(documentDetail.FileName))
+                {
+                    thisObject.Filename = documentDetail.FileName;
+                }
+
+                if (documentDetail.Data != null)
+                {
+                    thisObject.FileId = documentDetail.Data.AzureId.ToString().ToUpperInvariant();
+                    thisObject.MimeType = documentDetail.Data.MimeType;
+                    thisObject.Size = documentDetail.Data.Size;
+                }
+            }
+        }
+
+        public static void SetValuesFrom(this DocumentStore thisObject, DataDetail dataDetail)
+        {   
+            if (thisObject != null && dataDetail != null)
+            {
+                thisObject.FileId = dataDetail.AzureId.ToString().ToUpperInvariant();
+                thisObject.MimeType = dataDetail.MimeType;
+                thisObject.Size = dataDetail.Size;
+            }
+        }
+        public static void UpdateMetadata(this DocumentStore thisObject, MetadataDetailList metadataList)
+        {
+            if (thisObject != null && metadataList != null)
+            {
+                thisObject.Metadata = metadataList.SerializeToString<MetadataDetailList>();
+            }
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/MetadataDetailListExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace DataUp.Web.BizLogic
+{
+    public static class MetadataDetailListExtension
+    {
+        public static void UpdateFrom(this MetadataDetailList thisObject, MetadataDetailList actual)
+        {
+            if (thisObject != null && thisObject.Metadata != null && actual != null && actual.Metadata != null)
+            {
+                foreach (var item in thisObject.Metadata)
+                {
+                    var actualMetadata = actual.Metadata.Where(m => string.Compare(m.Name, item.Name, true) == 0).FirstOrDefault();
+                    if (actualMetadata != null)
+                    {
+                        item.Value = actualMetadata.Value;
+                    }
+                }
+            }
+
+            if (thisObject != null && thisObject.ParamterMetadata != null && actual != null && actual.ParamterMetadata != null)
+            {
+                foreach (var item in actual.ParamterMetadata)
+                {
+                    var attributeList = item.AttributeList.Distinct(new ParameterAttributeComparer());
+                    thisObject.ParamterMetadata.Add(new ParameterMetadataDetail
+                        {
+                            EntityName = item.EntityName,
+                             EntityDescription = item.EntityDescription,
+                              AttributeList = attributeList.ToList()
+                        });
+                    //ParameterMetadataDetail detail = null;
+                    //var actualMetadata = actual.ParamterMetadata.
+                    //    Where(m => (string.Compare(m.Name, item.Name, true) == 0 
+                    //        && string.Compare(m.Type, item.Type, true) == 0 
+                    //        && string.Compare(m.Units, item.Units, true) == 0 
+                    //        && string.Compare(m.Description, item.Description, true) == 0)).FirstOrDefault();
+                    //if (actualMetadata != null)
+                    //{
+                    //    detail = new ParameterMetadataDetail();
+                    //    detail.Name = actualMetadata.Name;
+                    //    detail.Description = actualMetadata.Description;
+                    //    detail.Type = actualMetadata.Type;
+                    //    detail.Units = actualMetadata.Units;
+                    //    thisObject.ParamterMetadata.Add(detail);
+                    //}
+                }
+            }
+        }
+
+    }
+
+
+}

Source/WebClient/Web.BizLogic/Extensions/SpreadsheetDocumentExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using DocumentFormat.OpenXml.Packaging;
+using DocumentFormat.OpenXml.Spreadsheet;
+using DocumentFormat.OpenXml;
+using DataUp.Web.Common;
+using System.Collections;
+using System.IO;
+using System.Web;
+using System.Xml;
+using DocumentFormat.OpenXml.Bibliography;
+
+namespace DataUp.Web.BizLogic
+{
+    /// <summary>
+    /// Extension methods for a Excel SpreadSheet.
+    /// </summary>
+    public static class SpreadsheetDocumentExtension
+    {
+        // Given a workbook document, and a sheet name, return the Worksheet
+        // corresponding to the supplied name. 
+        public static Sheet GetSheet(this SpreadsheetDocument document, string sheetName)
+        {
+            WorkbookPart wbPart = document.WorkbookPart;
+
+            // Find the sheet with the supplied name, and then use that Sheet object
+            // to retrieve a reference to the appropriate worksheet.
+            Sheet theSheet = wbPart.Workbook.Descendants<Sheet>().
+              Where(s => string.Compare(s.Name, sheetName, true) == 0).FirstOrDefault();
+
+            return theSheet;
+        }
+
+        public static Sheet InsertWorksheet(this SpreadsheetDocument document, string sheetName)
+        {
+            // Add a blank WorksheetPart.
+            WorksheetPart newWorksheetPart = document.WorkbookPart.AddNewPart<WorksheetPart>();
+            newWorksheetPart.Worksheet = new Worksheet(new SheetData());
+
+            Sheets sheets = document.WorkbookPart.Workbook.GetFirstChild<Sheets>();
+            string relationshipId = document.WorkbookPart.GetIdOfPart(newWorksheetPart);
+
+            // Get a unique ID for the new worksheet.
+            uint sheetId = 1;
+            if (sheets.Elements<Sheet>().Count() > 0)
+            {
+                sheetId = sheets.Elements<Sheet>().Select(s => s.SheetId.Value).Max() + 1;
+            }
+
+            // Append the new worksheet and associate it with the workbook.
+            Sheet sheet = new Sheet() { Id = relationshipId, SheetId = sheetId, Name = sheetName };
+            sheets.Append(sheet);
+
+            return sheet;
+        }
+
+        public static Sheet InsertMetadataWorksheet(this SpreadsheetDocument document, bool hasParameterMetaData)
+        {
+            // Add a blank WorksheetPart.
+            WorksheetPart newWorksheetPart = document.WorkbookPart.AddNewPart<WorksheetPart>();
+            newWorksheetPart.Worksheet = new Worksheet(new SheetData());
+
+            TableDefinitionPart tableDefinitionPart = newWorksheetPart.AddNewPart<TableDefinitionPart>();
+            GenerateTableDefinitionPartContent(tableDefinitionPart);
+
+            string paramTableId = String.Empty;
+            if (hasParameterMetaData)
+            {
+                //Generate ParameterMetaData.
+                TableDefinitionPart tableParameterPart = newWorksheetPart.AddNewPart<TableDefinitionPart>();
+                GenerateParameterTablePartContent(tableParameterPart);
+                paramTableId = newWorksheetPart.GetIdOfPart(tableParameterPart);
+            }
+            
+            //Generate Content.
+            GeneratePartContent(newWorksheetPart, new string[]{newWorksheetPart.GetIdOfPart(tableDefinitionPart), 
+                                                                       paramTableId });
+
+            Sheets sheets = document.WorkbookPart.Workbook.GetFirstChild<Sheets>();
+            string relationshipId = document.WorkbookPart.GetIdOfPart(newWorksheetPart);
+
+            // Get a unique ID for the new worksheet.
+            uint sheetId = 1;
+            if (sheets.Elements<Sheet>().Count() > 0)
+            {
+                sheetId = sheets.Elements<Sheet>().Select(s => s.SheetId.Value).Max() + 1;
+            }
+
+            // Append the new worksheet and associate it with the workbook.
+            Sheet sheet = new Sheet() { Id = relationshipId, SheetId = sheetId, Name = Constants.MetadataSheetName };
+            sheets.Append(sheet);
+
+            return sheet;
+        }
+
+        // Generates content of tableDefinitionPart1.
+        private static void GenerateTableDefinitionPartContent(TableDefinitionPart tableDefinitionPart)
+        {
+            Table table1 = new Table() { Id = (UInt32Value)5U, Name = Constants.MetadataRangeName, DisplayName = Constants.MetadataRangeName, Reference = "A1:B44", TotalsRowShown = false };
+            AutoFilter autoFilter1 = new AutoFilter() { Reference = "A1:B44" };
+
+            TableColumns tableColumns1 = new TableColumns() { Count = (UInt32Value)2U };
+            TableColumn tableColumn1 = new TableColumn() { Id = (UInt32Value)1U, Name = "Name" };
+            TableColumn tableColumn2 = new TableColumn() { Id = (UInt32Value)2U, Name = "Value" };
+
+            tableColumns1.Append(tableColumn1);
+            tableColumns1.Append(tableColumn2);
+            TableStyleInfo tableStyleInfo1 = new TableStyleInfo() { Name = Constants.MetadataTableStyleName, ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };
+
+            table1.Append(autoFilter1);
+            table1.Append(tableColumns1);
+            table1.Append(tableStyleInfo1);
+
+            tableDefinitionPart.Table = table1;
+        }
+
+        // Generates content of tableDefinitionPart1.
+        private static void GenerateParameterTablePartContent(TableDefinitionPart tableDefinitionPart)
+        {
+            Table table1 = new Table() { Id = (UInt32Value)6U, Name = Constants.ParaMetadataRangeName, DisplayName = Constants.ParaMetadataRangeName, Reference = "D1:I44", TotalsRowShown = false };
+            AutoFilter autoFilter1 = new AutoFilter() { Reference = "D1:I44" };
+
+            TableColumns tableColumns1 = new TableColumns() { Count = (UInt32Value)6U };
+
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)1U, Name = "EntityName" });
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)2U, Name = "EntityDescription" });
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)3U, Name = "Name" });
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)4U, Name = "Description" });
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)5U, Name = "Type" });
+            tableColumns1.Append(new TableColumn() { Id = (UInt32Value)6U, Name = "Units" });
+
+            TableStyleInfo tableStyleInfo1 = new TableStyleInfo() { Name = Constants.MetadataTableStyleName, ShowFirstColumn = false, ShowLastColumn = false, ShowRowStripes = true, ShowColumnStripes = false };
+
+            table1.Append(autoFilter1);
+            table1.Append(tableColumns1);
+            table1.Append(tableStyleInfo1);
+
+            tableDefinitionPart.Table = table1;
+        }
+
+        /// <summary>
+        /// Generates the content of the WorkSheet part.
+        /// </summary>
+        /// <param name="part">The part.</param>
+        private static void GeneratePartContent(WorksheetPart part, string[] partIds)
+        {
+            Worksheet worksheet1 = new Worksheet() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "x14ac" } };
+            worksheet1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
+            worksheet1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
+            worksheet1.AddNamespaceDeclaration("x14ac", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");
+            SheetDimension sheetDimension1 = new SheetDimension() { Reference = "A1:I44" };
+
+            SheetViews sheetViews1 = new SheetViews();
+
+            SheetView sheetView1 = new SheetView() { TabSelected = true, WorkbookViewId = (UInt32Value)0U };
+            Selection selection1 = new Selection() { ActiveCell = "K9", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "K9" } };
+
+            sheetView1.Append(selection1);
+
+            sheetViews1.Append(sheetView1);
+            SheetFormatProperties sheetFormatProperties1 = new SheetFormatProperties() { DefaultRowHeight = 15D, DyDescent = 0.25D };
+
+            Columns columns1 = new Columns();
+            Column column1 = new Column() { Min = (UInt32Value)1U, Max = (UInt32Value)2U, Width = 11D, CustomWidth = true };
+
+            columns1.Append(column1);
+
+            SheetData sheetData1 = new SheetData();
+
+            Row row1 = new Row() { RowIndex = (UInt32Value)1U, Spans = new ListValue<StringValue>() { InnerText = (String.IsNullOrEmpty(partIds[1]))?"1:2" : "1:9" }, DyDescent = 0.25D };
+
+            Cell cell1 = new Cell() { CellReference = "A1", DataType = CellValues.String };
+            CellValue cellValue1 = new CellValue(){Text = "Name"};
+            cell1.Append(cellValue1);
+            row1.Append(cell1);
+
+            Cell cell2 = new Cell() { CellReference = "B1", DataType = CellValues.String };
+            CellValue cellValue2 = new CellValue(){Text = "Value"};
+            cell2.Append(cellValue2);
+            row1.Append(cell2);
+
+            if (!String.IsNullOrEmpty(partIds[1]))
+            {
+                Cell cell3 = new Cell() { CellReference = "D1", DataType = CellValues.String };
+                CellValue cellValue3 = new CellValue() { Text = "EntityName" };
+
+                cell3.Append(cellValue3);
+                row1.Append(cell3);
+
+                Cell cell4 = new Cell() { CellReference = "E1", DataType = CellValues.String };
+                CellValue cellValue4 = new CellValue() { Text = "EntityDescription" };
+                cell4.Append(cellValue4);
+                row1.Append(cell4);
+
+                Cell cell5 = new Cell() { CellReference = "F1", DataType = CellValues.String };
+                CellValue cellValue5 = new CellValue(){Text = "Name"};
+                cell5.Append(cellValue5);
+                row1.Append(cell5);
+
+                Cell cell6 = new Cell() { CellReference = "G1", DataType = CellValues.String };
+                CellValue cellValue6 = new CellValue(){Text = "Description"};
+                cell6.Append(cellValue6);
+                row1.Append(cell6);
+
+                Cell cell7 = new Cell() { CellReference = "H1", DataType = CellValues.String };
+                CellValue cellValue7 = new CellValue(){Text = "Type"};
+                cell7.Append(cellValue7);
+                row1.Append(cell7);
+
+                Cell cell8 = new Cell() { CellReference = "I1", DataType = CellValues.String };
+                CellValue cellValue8 = new CellValue(){Text = "Units"};
+                cell8.Append(cellValue8);
+                row1.Append(cell8);
+            }
+
+            sheetData1.Append(row1);
+            PageMargins pageMargins1 = new PageMargins() { Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D };
+
+            TableParts tableParts1 = new TableParts() { Count =  (String.IsNullOrEmpty(partIds[1]))?(UInt32Value)1U : (UInt32Value)2U };
+            tableParts1.Append(new TablePart() { Id = partIds[0] });
+
+            if (!String.IsNullOrEmpty(partIds[1]))
+            {
+                tableParts1.Append(new TablePart() { Id = partIds[1] });   
+            }
+
+            worksheet1.Append(sheetDimension1);
+            worksheet1.Append(sheetViews1);
+            worksheet1.Append(sheetFormatProperties1);
+            worksheet1.Append(columns1);
+            worksheet1.Append(sheetData1);
+            worksheet1.Append(pageMargins1);
+            worksheet1.Append(tableParts1);
+
+            part.Worksheet = worksheet1;
+        }
+
+        public static bool SetCellValue(this SpreadsheetDocument document, Sheet metadataSheet, string addressName, string value)
+        {
+            // If the string exists in the shared string table, get its index.
+            // If the string doesn't exist in the shared string table, add it and get the next index.
+
+            // Assume failure.
+            bool returnValue = false;
+
+            // Open the document for editing.
+            WorkbookPart wbPart = document.WorkbookPart;
+
+            if (metadataSheet != null)
+            {
+                Worksheet ws = ((WorksheetPart)(wbPart.GetPartById(metadataSheet.Id))).Worksheet;
+
+                Cell theCell = ws.InsertCellInWorksheet(addressName);
+
+                // Either retrieve the index of an existing string,
+                // or insert the string into the shared string table
+                // and get the index of the new item.
+                int stringIndex = wbPart.InsertSharedStringItem(value);
+
+                theCell.CellValue = new CellValue(stringIndex.ToString());
+                theCell.DataType = new EnumValue<CellValues>(CellValues.SharedString);
+
+                // Save the worksheet.
+                ws.Save();
+                returnValue = true;
+            }
+
+            return returnValue;
+        }
+
+        // Get the value of a cell, given a file name, sheet name, and address name.
+        public static string GetCellValue(this SpreadsheetDocument document, Sheet metadataSheet, string addressName)
+        {
+            string value = string.Empty;
+
+            WorkbookPart wbPart = document.WorkbookPart;
+
+            // Retrieve a reference to the worksheet part, and then use its Worksheet property to get 
+            // a reference to the cell whose address matches the address you've supplied:
+            WorksheetPart wsPart = (WorksheetPart)(wbPart.GetPartById(metadataSheet.Id));
+            Cell theCell = wsPart.Worksheet.Descendants<Cell>().
+              Where(c => c.CellReference == addressName).FirstOrDefault();
+
+            // If the cell doesn't exist, return an empty string:
+            if (theCell != null)
+            {
+                value = theCell.InnerText;
+
+                // If the cell represents an integer number, you're done. 
+                // For dates, this code returns the serialized value that 
+                // represents the date. The code handles strings and booleans
+                // individually. For shared strings, the code looks up the corresponding
+                // value in the shared string table. For booleans, the code converts 
+                // the value into the words TRUE or FALSE.
+                if (theCell.DataType != null)
+                {
+                    switch (theCell.DataType.Value)
+                    {
+                        case CellValues.SharedString:
+                            // For shared strings, look up the value in the shared strings table.
+                            var stringTable = wbPart.GetPartsOfType<SharedStringTablePart>().FirstOrDefault();
+                            // If the shared string table is missing, something's wrong.
+                            // Just return the index that you found in the cell.
+                            // Otherwise, look up the correct text in the table.
+                            if (stringTable != null)
+                            {
+                                value = stringTable.SharedStringTable.ElementAt(int.Parse(value)).InnerText;
+                            }
+                            break;
+
+                        case CellValues.Boolean:
+                            switch (value)
+                            {
+                                case "0":
+                                    value = "FALSE";
+                                    break;
+                                default:
+                                    value = "TRUE";
+                                    break;
+                            }
+                            break;
+                    }
+                }
+            }
+            return value;
+        }
+
+        /// <summary>
+        /// Gets the metadata details.
+        /// </summary>
+        /// <param name="excelDocument">The excel document.</param>
+        /// <returns>List of Metadata</returns>
+        public static MetadataDetailList GetMetadataDetails(this SpreadsheetDocument excelDocument)
+        {
+
+            MetadataDetailList metadataList = null;
+            var metadataSheet = excelDocument.GetSheet(Constants.MetadataSheetName);
+            if (metadataSheet == null)
+            {
+                var defaultMetadata = MetadataHelper.GetDefaultMetadataList();
+
+                UpdateDefaultProperties(excelDocument, defaultMetadata);
+
+                metadataList = new MetadataDetailList()
+                {
+                    Metadata = defaultMetadata
+                };
+            }
+            else
+            {
+                Hashtable actualMetadata = new Hashtable();
+                Hashtable actualParameterData = new Hashtable();
+                Collection<ParameterMetadataDetail> paramterMetadata = new Collection<ParameterMetadataDetail>();
+
+                // Get Value from Metadata Sheet.
+                for (int i = 1; i < 45; i++)
+                {
+                    string key = excelDocument.GetCellValue(metadataSheet, "A" + i.ToString());
+                    string value = excelDocument.GetCellValue(metadataSheet, "B" + i.ToString());
+
+                    if (!string.IsNullOrWhiteSpace(key) && !actualMetadata.ContainsKey(key))
+                    {
+                        actualMetadata.Add(key, value);
+                    }
+                }
+
+                int current = 2;
+                string name = excelDocument.GetCellValue(metadataSheet, "D" + current);
+                string prevName = String.Empty;
+                ParameterMetadataDetail paramData = default(ParameterMetadataDetail);
+                while (!string.IsNullOrWhiteSpace(name))
+                {
+                    if (prevName != name)
+                    {
+                        paramData = new ParameterMetadataDetail()
+                                            {
+                                                EntityName = excelDocument.GetCellValue(metadataSheet, "D" + current.ToString()),
+                                                EntityDescription = excelDocument.GetCellValue(metadataSheet, "E" + current.ToString()),
+                                            };
+                    }
+
+                    paramData.AttributeList.Add(
+                        new ParameterAttribute
+                        {
+                            Name = excelDocument.GetCellValue(metadataSheet, "F" + current.ToString()),
+                            Description = excelDocument.GetCellValue(metadataSheet, "G" + current.ToString()),
+                            Type = excelDocument.GetCellValue(metadataSheet, "H" + current.ToString()),
+                            Units = excelDocument.GetCellValue(metadataSheet, "I" + current.ToString())
+                        });
+
+                    current++;
+                    prevName = name;
+                    name = excelDocument.GetCellValue(metadataSheet, "D" + current);
+                    if (prevName != name)
+                    {
+                        paramterMetadata.Add(paramData);
+                    }
+                }
+
+                var defaultMetadata = MetadataHelper.GetDefaultMetadataList();
+                foreach (var item in defaultMetadata)
+                {
+                    if (!string.IsNullOrWhiteSpace(item.Type) && item.Type.Trim() == "DateTime")
+                    {
+
+                        DateTime result;
+
+                        if (!string.IsNullOrWhiteSpace(actualMetadata[item.Name].ToString()) && !DateTime.TryParse(actualMetadata[item.Name].ToString(), out result))
+                        {
+                            double d = double.Parse(actualMetadata[item.Name].ToString());
+                            DateTime convDateTime = DateTime.FromOADate(d);
+                            item.Value = convDateTime.ToString("yyyy-MM-dd");
+                        }
+                        else
+                        {
+                            item.Value = actualMetadata.ContainsKey(item.Name) ? actualMetadata[item.Name].ToString() : string.Empty;
+                        }
+
+                    }
+
+                    else
+                    {
+                        item.Value = actualMetadata.ContainsKey(item.Name) ? actualMetadata[item.Name].ToString() : string.Empty;
+                    }
+                }
+
+                metadataList = new MetadataDetailList()
+                {
+                    Metadata = defaultMetadata,
+                    ParamterMetadata = paramterMetadata
+                };
+            }
+
+            return metadataList;
+        }
+
+        /// <summary>
+        /// Updates the default properties.
+        /// </summary>
+        /// <param name="excelDocument">The excel document.</param>
+        /// <param name="defaultMetadata">The default metadata.</param>
+        private static void UpdateDefaultProperties(SpreadsheetDocument excelDocument, Collection<MetadataDetail> defaultMetadata)
+        {
+
+            // Get Values from default properties.
+            var corePart = excelDocument.CoreFilePropertiesPart;
+            XmlDocument xmlProperties = new XmlDocument();
+            if (corePart == null)
+            {
+                return;
+            }
+            xmlProperties.Load(corePart.GetStream());
+            try
+            {
+                var date = xmlProperties.GetElementsByTagName("created", Constants.DCTerms).Item(0);
+                var dateNode = defaultMetadata.Where(m => m.Name.EndsWith("Today's date", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
+                if (dateNode != null && (date != null))
+                {
+                    //dateNode.Value = DateTime.Now.ToString(Constants.Dateformate, System.Globalization.CultureInfo.GetCultureInfo("en-US"));
+                    dateNode.Value = DateTime.Parse(date.InnerText).ToString(Constants.Dateformate);
+                }
+            }
+            catch (Exception)
+            {
+
+            }
+
+            // Access Title property
+            try
+            {
+                var title = xmlProperties.GetElementsByTagName("title", Constants.DC).Item(0);
+
+                // title
+                var titleNode = defaultMetadata.Where(m => m.Name.EndsWith("Title of dataset", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
+                if (titleNode != null)
+                {
+                    titleNode.Value = (title != null) ? title.InnerText : string.Empty;
+                }
+            }
+            catch (Exception)
+            {
+
+            }
+        }
+
+        public static string GetSheetName(this SpreadsheetDocument document, WorksheetPart sheet)
+        {
+            string sheetID = document.WorkbookPart.GetIdOfPart(sheet);
+            WorkbookPart wbPart = document.WorkbookPart;
+
+            // Find the sheet with the supplied name, and then use that Sheet object
+            // to retrieve a reference to the appropriate worksheet.
+            Sheet theSheet = wbPart.Workbook.Descendants<Sheet>()
+                .Where(s => s.Id == sheetID).FirstOrDefault();
+            return theSheet.Name;
+        }
+
+        public static string GetSheetId(this SpreadsheetDocument document, WorksheetPart sheet)
+        {
+            string sheetID = document.WorkbookPart.GetIdOfPart(sheet);
+            WorkbookPart wbPart = document.WorkbookPart;
+
+            // Find the sheet with the supplied name, and then use that Sheet object
+            // to retrieve a reference to the appropriate worksheet.
+            Sheet theSheet = wbPart.Workbook.Descendants<Sheet>()
+                .Where(s => s.Id == sheetID).FirstOrDefault();
+            return theSheet.SheetId;
+        }
+
+        public static bool IsSheetHidden(this SpreadsheetDocument document, WorksheetPart sheet)
+        {
+            bool isHidden = false;
+            string sheetID = document.WorkbookPart.GetIdOfPart(sheet);
+            WorkbookPart wbPart = document.WorkbookPart;
+            Sheet theSheet = wbPart.Workbook.Descendants<Sheet>().Where(s => s.Id == sheetID).First();
+            // string name = sheet.
+            if (theSheet.State == "Hidden" || theSheet.State == "veryHidden")
+            {
+                isHidden = true;
+            }
+            return isHidden;
+        }
+
+        /// <summary>
+        /// Gets the zip file stream.
+        /// </summary>
+        /// <param name="document">The SpreadSheet document.</param>
+        /// <returns></returns>
+        public static Stream GetZipFileStream(this SpreadsheetDocument document, string name)
+        {
+            SharedStringTable sharedstringtable = new SharedStringTable();
+
+            System.Text.StringBuilder sb = new System.Text.StringBuilder();
+
+            WorkbookPart wbPart = document.WorkbookPart;
+            var sheets = wbPart.GetPartsOfType<WorksheetPart>();
+
+            WorkbookStylesPart workbookStylesPart = document.WorkbookPart.GetPartsOfType<WorkbookStylesPart>().FirstOrDefault();
+            var sharedStringPart = wbPart.SharedStringTablePart;
+            CellFormats cellFormats = null;
+            if (workbookStylesPart != null)
+            {
+                cellFormats = (CellFormats)workbookStylesPart.Stylesheet.CellFormats;
+            }
+
+            if (sharedStringPart != null)
+            {
+                sharedstringtable = sharedStringPart.SharedStringTable;
+            }
+
+            string fileName = string.Format("{0}\\{1}\\", Path.GetTempPath(), Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));
+
+            DirectoryInfo dir = Directory.CreateDirectory(fileName);
+            SheetData sheetdata;
+            string sheetName = String.Empty;
+
+            foreach (var sheet in sheets)
+            {
+                sheetdata = sheet.Worksheet.Elements<SheetData>().FirstOrDefault();
+                sheetName = document.GetSheetName(sheet);
+                if (sheetdata.Descendants<Row>().Count() > 0 && sheetName != Constants.MetadataSheetName)
+                {
+                    try
+                    {
+                        string filename = string.Format("{0}{1}-{2}.csv", dir.FullName, name, sheetName);
+                        using (StreamWriter file = new StreamWriter(filename))
+                        {
+                            foreach (var row in sheetdata.Descendants<Row>())
+                            {
+                                foreach (Cell cell in row.Descendants<Cell>())
+                                {
+                                    if (cell.CellValue != null)
+                                    {
+                                        string val = GetCellValue(sharedstringtable, cellFormats, cell);
+                                        sb.AppendFormat("{0},", CsvHelper.Escape(val));
+                                    }
+                                    else
+                                    {
+                                        sb.Append(",");
+                                    }
+                                }
+                                file.WriteLine(sb.ToString());
+                                sb.Clear();
+                            }
+                        }
+                    }
+                    catch (Exception)
+                    {
+                        throw;
+                    }
+                }
+            }
+            sb = null;
+            return ZipFileHelper.ZipFiles(dir.FullName);
+        }
+
+        private static string GetCellValue(SharedStringTable sharedstringtable, CellFormats cellFormats, Cell cell)
+        {
+            string str = string.Empty;
+            if (cell.DataType == null)
+            {
+                if (cell.StyleIndex != null)
+                {
+                    CellFormat cf = cellFormats.Descendants<CellFormat>().ElementAt<CellFormat>(Convert.ToInt32(cell.StyleIndex.Value));
+                    //this is for number
+                    if (cf.NumberFormatId != null && cf.NumberFormatId >= 0 && cf.NumberFormatId <= 13)
+                    {
+                        decimal decimalValue = 0.0M;
+                        decimal.TryParse(cell.CellValue.Text, out decimalValue);
+                        var valtxt = decimalValue;
+                        str = valtxt.ToString();
+
+                    }
+                    //this is for date
+                    else if (cf.NumberFormatId != null && cf.NumberFormatId >= 14 && cf.NumberFormatId <= 22)
+                    {
+                        var valdate = DateTime.FromOADate(Convert.ToDouble(cell.CellValue.Text));
+                        str = valdate.ToString();
+                    }
+                    else
+                    {
+                        //this is for some text
+                        var valtxt = cell.CellValue.Text;
+                        str = valtxt.ToString();
+                    }
+                }
+                else
+                {
+                    decimal decimalValue = 0.0M;
+                    decimal.TryParse(cell.CellValue.Text, out decimalValue);
+                    var valtxt = decimalValue;
+                    str = valtxt.ToString();
+                }
+            }
+            else
+            {
+                switch (cell.DataType.Value)
+                {
+                    case CellValues.SharedString:
+                        if (sharedstringtable != null)
+                        {
+                            var sharedstring = sharedstringtable.ChildElements[Convert.ToInt32(cell.CellValue.Text)].InnerText;
+                            if (sharedstring != null)
+                            {
+                                str = sharedstring.ToString();
+                            }
+                        }
+                        break;
+                    case CellValues.Boolean:
+                        str = cell.CellValue.Text == "1" ? "true" : "false";
+                        break;
+                    case CellValues.Date:
+                        var dateval = DateTime.FromOADate(Convert.ToDouble(cell.CellValue.Text));
+                        str = dateval.ToString();
+                        break;
+                    case CellValues.Number:
+                        decimal decimalValue = 0.0M;
+                        decimal.TryParse(cell.CellValue.Text, out decimalValue);
+                        var numval = decimalValue;
+                        str = numval.ToString();
+                        break;
+                    default:
+                        if (cell.CellValue != null)
+                        {
+                            var somtxt = cell.CellValue.Text;
+                            if (somtxt != null)
+                            {
+                                str = somtxt.ToString();
+                            }
+                        }
+                        break;
+                }
+            }
+            return str;
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/WorkbookPartExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using DocumentFormat.OpenXml.Packaging;
+using DocumentFormat.OpenXml.Spreadsheet;
+
+namespace DataUp.Web.BizLogic
+{
+    public static class WorkbookPartExtension
+    {
+        // Given the main workbook part, and a text value, insert the text into the shared
+        // string table. Create the table if necessary. If the value already exists, return
+        // its index. If it doesn't exist, insert it and return its new index.
+        public static int InsertSharedStringItem(this WorkbookPart wbPart, string value)
+        {
+            // Insert a value into the shared string table, creating the table if necessary.
+            // Insert the string if it's not already there.
+            // Return the index of the string.
+
+            int index = 0;
+            bool found = false;
+            var stringTablePart = wbPart.GetPartsOfType<SharedStringTablePart>().FirstOrDefault();
+
+            // If the shared string table is missing, something's wrong.
+            // Just return the index that you found in the cell.
+            // Otherwise, look up the correct text in the table.
+            if (stringTablePart == null)
+            {
+                // Create it.
+                stringTablePart = wbPart.AddNewPart<SharedStringTablePart>();
+            }
+       
+            SharedStringTable stringTable;
+
+            if (stringTablePart != null && stringTablePart.SharedStringTable != null)
+            {
+               stringTable = stringTablePart.SharedStringTable;
+            }
+            else
+            {
+                stringTable = new SharedStringTable();
+                stringTablePart.SharedStringTable = new SharedStringTable();
+            }
+
+            // Iterate through all the items in the SharedStringTable. If the text already exists, return its index.
+            foreach (SharedStringItem item in stringTable.Elements<SharedStringItem>())
+            {
+                if (item.InnerText == value)
+                {
+                    found = true;
+                    break;
+                }
+                index += 1;
+            }
+
+            if (!found)
+            {
+                if (stringTablePart.SharedStringTable.Count==null)
+                {
+                    stringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(value)));
+                    stringTablePart.SharedStringTable.Save();
+                }
+                else
+                {
+                    stringTable.AppendChild(new SharedStringItem(new Text(value)));
+                    // stringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(value)));
+                    stringTable.Save();
+                }
+            }
+
+            return index;
+        }
+
+    }
+}

Source/WebClient/Web.BizLogic/Extensions/WorksheetExtension.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using DocumentFormat.OpenXml.Spreadsheet;
+using System.Text.RegularExpressions;
+
+namespace DataUp.Web.BizLogic
+{
+    public static class WorksheetExtension
+    {
+
+        // Given a Worksheet and an address (like "AZ254"), either return a cell reference, or 
+        // create the cell reference and return it.
+        public static Cell InsertCellInWorksheet(this Worksheet ws, string addressName)
+        {
+            // Use regular expressions to get the row number and column name.
+            // If the parameter wasn't well formed, this code
+            // will fail:
+            Regex rx = new Regex("^(?<col>\\D+)(?<row>\\d+)");
+            Match m = rx.Match(addressName);
+            uint rowNumber = uint.Parse(m.Result("${row}"));
+            string colName = m.Result("${col}");
+
+            SheetData sheetData = ws.GetFirstChild<SheetData>();
+            string cellReference = (colName + rowNumber.ToString());
+            Cell theCell = null;
+
+            // If the worksheet does not contain a row with the specified row index, insert one.
+            var theRow = sheetData.Elements<Row>().
+              Where(r => r.RowIndex.Value == rowNumber).FirstOrDefault();
+            if (theRow == null)
+            {
+                theRow = new Row();
+                theRow.RowIndex = rowNumber;
+                sheetData.Append(theRow);
+            }
+
+            // If the cell you need already exists, return it.
+            // If there is not a cell with the specified column name, insert one.  
+            Cell refCell = theRow.Elements<Cell>().
+              Where(c => c.CellReference.Value == cellReference).FirstOrDefault();
+            if (refCell != null)
+            {
+                theCell = refCell;
+            }
+            else
+            {
+                // Cells must be in sequential order according to CellReference. Determine where to insert the new cell.
+                foreach (Cell cell in theRow.Elements<Cell>())
+                {
+                    if (string.Compare(cell.CellReference.Value, cellReference, true) > 0)
+                    {
+                        refCell = cell;
+                        break;
+                    }
+                }
+
+                theCell = new Cell();
+                theCell.CellReference = cellReference;
+
+                theRow.InsertBefore(theCell, refCell);
+            }
+            return theCell;
+        }
+    }
+}

Source/WebClient/Web.BizLogic/Helper/CsvHelper.cs

+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace DataUp.Web.BizLogic