Skip to content

Commit

Permalink
Readme update and nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
tiorac committed Jul 5, 2022
1 parent 3d777bb commit 5afe356
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ Currently it is only generating reports in spreadsheets.

## Installing

_pending_
* Package Manager

```
Install-Package BlackDigital.Report
```

* .NET CLI

```
dotnet add package BlackDigital.Report
```

## Coding

Expand Down Expand Up @@ -63,7 +73,7 @@ _pending_
.BuildAsync(@"test.xlsx");
```

![Example](https://github.com/blackdigital-br/BlackReport/blob/main/docs/images/ClassExample.png?raw=true)
![Example](https://raw.githubusercontent.com/blackdigital-br/BlackReport/main/docs/images/ClassExample.png)

### From List

Expand Down Expand Up @@ -102,7 +112,7 @@ _pending_
.BuildAsync(@"test.xlsx");
```

![Example](https://github.com/blackdigital-br/BlackReport/blob/main/docs/images/ListExample.png?raw=true)
![Example](https://raw.githubusercontent.com/blackdigital-br/BlackReport/main/docs/images/ListExample.png)

### Others Examples

Expand Down Expand Up @@ -138,14 +148,21 @@ _pending_
```

### Example

https://github.com/blackdigital-br/BlackReport/tree/main/src/BlackDigital.Report.Example

## Roadmap

☑️ Excel Tables. (0.1.0.0)
☑️ Fill from instance class. (0.1.0.0)
◼️ Use DisplayAttribute to get name of columns and properties that should be generated.
◼️ Excel Shared String.
◼️ Cells with formulas.
◼️ Cell value set event.
◼️ Cell value event.
◼️ Tables footers.
◼️ Unit test.
◼️ Multiple tables in the same worksheet.
◼️ Olders .net versions.
◼️ Others types (Word, csv...).
◼️ Your suggestion.
Expand Down
2 changes: 2 additions & 0 deletions src/BlackDigital.Report.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"Column 4"
};



var report = ReportGenerator.Spreadsheet()
.SetCompany("BlackDigital")
.SetType(SpreadsheetDocumentType.Workbook)
Expand Down
16 changes: 16 additions & 0 deletions src/BlackDigital.Report/BlackDigital.Report.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>$(VersionPrefix)0.1.0</Version>
<Description>Simple report generator using OpenXML. Currently it is only generating reports in spreadsheets.</Description>
<PackageProjectUrl>https://github.com/blackdigital-br/BlackReport</PackageProjectUrl>
<RepositoryUrl>https://github.com/blackdigital-br/BlackReport</RepositoryUrl>
<SignAssembly>False</SignAssembly>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="2.17.1" />
</ItemGroup>
Expand Down
14 changes: 0 additions & 14 deletions src/BlackDigital.Report/ReportBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ namespace BlackDigital.Report
{
public abstract class ReportBuilder
{

/*protected readonly IReportGenerator Report;
public Task<byte[]> GenerateAsync(IEnumerable<IEnumerable<object>> data, IEnumerable<string> columns)
{
return Report.GenerateReportAsync(data, columns, this);
}
public Task<byte[]> GenerateAsync<T>(IEnumerable<T> data)
{
return GenerateAsync(ObjectToData(data), typeof(T).GetProperties().Select(p => p.Name));
}*/

public abstract Task<byte[]> BuildAsync();

public async Task BuildAsync(Stream stream)
Expand Down

0 comments on commit 5afe356

Please sign in to comment.