Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="NSax" Version="1.0.2" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NuGetizer" Version="1.1.0" />
<PackageVersion Include="NUnit" Version="4.3.2" />
Expand All @@ -26,4 +27,4 @@
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.2" />
<PackageVersion Include="ZString" Version="2.6.0" />
</ItemGroup>
</Project>
</Project>
14 changes: 8 additions & 6 deletions main/HSSF/Extractor/ExcelExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ExcelExtractor : POIOLE2TextExtractor, IExcelExtractor
private bool formulasNotResults = false;
private bool includeCellComments = false;
private bool includeBlankCells = false;
private bool includeHeaderFooter = true;
private bool includeHeadersFooters = true;
/// <summary>
/// Initializes a new instance of the <see cref="ExcelExtractor"/> class.
/// </summary>
Expand All @@ -65,13 +65,13 @@ public ExcelExtractor(POIFSFileSystem fs)
/// <summary>
/// Should header and footer be included? Default is true
/// </summary>
public bool IncludeHeaderFooter
public bool IncludeHeadersFooters
{
get {
return this.includeHeaderFooter;
return this.includeHeadersFooters;
}
set {
this.includeHeaderFooter = value;
this.includeHeadersFooters = value;
}
}
/// <summary>
Expand Down Expand Up @@ -137,6 +137,8 @@ public bool IncludeBlankCells
}
}

public bool AddTabEachEmptyCell { get; set; }

/// <summary>
/// Retreives the text contents of the file
/// </summary>
Expand Down Expand Up @@ -168,7 +170,7 @@ public override String Text
}

// Header text, if there is any
if (sheet.Header != null && includeHeaderFooter)
if (sheet.Header != null && includeHeadersFooters)
{
text.Append(
ExtractHeaderFooter(sheet.Header)
Expand Down Expand Up @@ -289,7 +291,7 @@ public override String Text
}

// Finally Feader text, if there is any
if (sheet.Footer != null && includeHeaderFooter)
if (sheet.Footer != null && includeHeadersFooters)
{
text.Append(
ExtractHeaderFooter(sheet.Footer)
Expand Down
4 changes: 3 additions & 1 deletion main/SS/Extractor/ExcelExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public interface IExcelExtractor
bool IncludeCellComments { get; set; }
bool IncludeSheetNames { get; set; }
bool FormulasNotResults { get; set; }
bool IncludeHeaderFooter { get; set; }
bool IncludeHeadersFooters { get; set; }
//Add a tab delimiter for each empty cell.
bool AddTabEachEmptyCell { get; set; }
/**
* Retreives the text contents of the file
*/
Expand Down
2 changes: 1 addition & 1 deletion ooxml/NPOI.OOXML.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<Compile Remove="POIFS\Crypt\Dsig\KeyInfoKeySelector.cs" />
<Compile Remove="POIFS\Crypt\Dsig\Services\RelationshipTransformService.cs" />
<Compile Remove="Properties\AssemblyInfoDotnet2.cs" />
<Compile Remove="XSSF\Extractor\XSSFEventBasedExcelExtractor.cs" />
<Compile Remove="XSSF\UserModel\Charts\XSSFNumberCache.cs" />
</ItemGroup>

Expand All @@ -26,6 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NSax" />
<PackageReference Include="System.Security.Cryptography.Xml" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions ooxml/POIXMLTextExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ public POIXMLTextExtractor(POIXMLDocument document)
/**
* Returns the core document properties
*/
public CoreProperties GetCoreProperties()
public virtual CoreProperties GetCoreProperties()
{
return _document.GetProperties().CoreProperties;
}
/**
* Returns the extended document properties
*/
public ExtendedProperties GetExtendedProperties()
public virtual ExtendedProperties GetExtendedProperties()
{
return _document.GetProperties().ExtendedProperties;
}
/**
* Returns the custom document properties
*/
public CustomProperties GetCustomProperties()
public virtual CustomProperties GetCustomProperties()
{
return _document.GetProperties().CustomProperties;
}
Expand Down
6 changes: 3 additions & 3 deletions ooxml/SS/Converter/ExcelToHtmlConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ private static void BuildStyle_Border(IWorkbook workbook, StringBuilder style, S
var stylesSource = ((XSSFWorkbook) workbook).GetStylesSource();
if (stylesSource != null)
{
var theme = stylesSource.GetTheme();
var theme = stylesSource.Theme;
if (theme != null)
color = theme.GetThemeColor(borderColor);
}
Expand Down Expand Up @@ -853,9 +853,9 @@ private static void BuildStyle_Font(IWorkbook workbook, StringBuilder style, IFo
{
StylesTable st = ((XSSFWorkbook)workbook).GetStylesSource();
XSSFColor fontColor = null;
if (st != null && st.GetTheme() != null)
if (st != null && st.Theme != null)
{
fontColor = st.GetTheme().GetThemeColor(font.Color);
fontColor = st.Theme.GetThemeColor(font.Color);
}
else
{
Expand Down
Loading
Loading