Skip to content

Commit

Permalink
minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
77it committed Dec 31, 2019
1 parent 1a31ee3 commit aa90c90
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ This demonstrates an adding worksheets from preexisting workbooks. See also [Pro

This is an example of [prototyping](#prototyping).

### [S7BalanceSheet.cs][s7balancesheet.cs]

This demonstrates the creation of a Balance Sheet report with headers and a variable number of columns and rows of data.

## Concepts

### Model Description
Expand Down Expand Up @@ -449,4 +453,5 @@ along with this library. If not, see <https://www.gnu.org/licenses/>.
[s3calendar.cs]: src/BookFx.Usage/S3Calendar.cs
[s5protosheet.cs]: src/BookFx.Usage/S5ProtoSheet.cs
[s6protobox.cs]: src/BookFx.Usage/S6ProtoBox.cs
[s-3-calendar]: docs/img/s-3-calendar-en.png "S3Calendar.cs result"
[s7balancesheet.cs]: src/BookFx.Usage/S7BalanceSheet.cs
[s-3-calendar]: docs/img/s-3-calendar-en.png "S3Calendar.cs result"
19 changes: 12 additions & 7 deletions src/BookFx.Usage/S7BalanceSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using BookFx;

using static Make;

Expand Down Expand Up @@ -86,19 +85,25 @@ static Box MakeDataColumn(DataColumn dataColumn)

private static AccountingDataToWriteToExcel GetAccountingData()
{
DataColumn firstColumn = new DataColumn("2019/01/31", new List<decimal>() { 100, 50, -20, -40, -90 });
DataColumn secondColumn = new DataColumn("2019/02/28", new List<decimal>() { 120, 45, -35, -40, -90 });
DataColumn thirdColumn = new DataColumn("2019/03/31", new List<decimal>() { 95, 45, -10, -40, -90 });
DataColumn firstColumn = new DataColumn("2019/01/31", new List<decimal> { 100, 50, -20, -40, -90 });
DataColumn secondColumn = new DataColumn("2019/02/28", new List<decimal> { 120, 45, -35, -40, -90 });
DataColumn thirdColumn = new DataColumn("2019/03/31", new List<decimal> { 95, 45, -10, -40, -90 });

var columnLabels = new List<string>() { "Dates", "Current assets", "Long term assets", "Current liabilities", "Long term liabilities", "Equity" };
var dataColumns = new List<DataColumn>() { firstColumn, secondColumn, thirdColumn };
var columnLabels = new List<string>
{ "Dates", "Current assets", "Long term assets", "Current liabilities", "Long term liabilities", "Equity" };
var dataColumns = new List<DataColumn> { firstColumn, secondColumn, thirdColumn };

return new AccountingDataToWriteToExcel("Best company", "Balance Sheet", DateTime.Now, columnLabels, dataColumns);
}

private class AccountingDataToWriteToExcel
{
public AccountingDataToWriteToExcel(string company, string reportName, DateTime reportDate, IEnumerable<string> columnLabels, IEnumerable<DataColumn> dataColumns)
public AccountingDataToWriteToExcel(
string company,
string reportName,
DateTime reportDate,
IEnumerable<string> columnLabels,
IEnumerable<DataColumn> dataColumns)
{
Company = company;
ReportName = reportName;
Expand Down

0 comments on commit aa90c90

Please sign in to comment.