private void WriteTrialBalance(string outputFileName) { var headings = new List <string> { "S.No.", "Account", "Tag", "Credit", "Debit" }; var trialBalanceStatements = _dataStore.GetPackage(WorkFlowViewModel.TrialBalanceStatementsPackageDefinition) .MakeAccountPrintable(_dataStore, WorkFlowViewModel.DisplayableAccountNamesDictionaryPackageDefinition); using (var writer = new ExcelSheetWriter(outputFileName, "TrialBalance")) { var index = 0; writer.Write(index++, headings.ToArray <object>()); writer.SetColumnsWidth(6, 45, 12, 12, 12, 12); writer.ApplyHeadingFormat(headings.Count); writer.WriteList(index, trialBalanceStatements, (b, rowIndex) => new object[] { rowIndex - 1, b.Account, b.Tag, b.GetCreditValue(), b.GetDebitValue(), }); index = index + 1 + trialBalanceStatements.Count; writer.Write(index, new object[] { "", "Total", "", trialBalanceStatements.GetCreditTotal(), trialBalanceStatements.GetDebitTotal(), trialBalanceStatements.GetTotal() }); } }
private void WriteAccount(IAccount account, string outputFileName) { var statements = account.GetAccountStatements(); var headings = new List <string> { "S.No.", "Date", "Account", "Credit", "Debit", "Balance" }; using (var writer = new ExcelSheetWriter(outputFileName, "Acc-" + account.GetPrintableName())) { var index = 0; writer.Write(index++, headings.ToArray <object>()); writer.SetColumnsWidth(6, 12, 45, 12, 12, 12); writer.ApplyHeadingFormat(headings.Count); writer.WriteList(index, statements, (b, rowIndex) => new object[] { b.SerialNumber, b.Date, b.Description, b.GetCreditValue(), b.GetDebitValue(), b.RunningTotaledValue, }); index = index + 1 + statements.Count; writer.Write(index, new object[] { "", "Total", "", statements.GetCreditTotal(), statements.GetDebitTotal(), statements.GetTotal() }); } }
public void onShowDocumentation(IRibbonControl control) { ExcelAsyncUtil.QueueAsMacro(() => { ExcelSheetWriter.WriteDocumentationSheet(); }); }
public void WirteAccountDefinitions(IList <AccountDefintionStatement> accountDefintionStatements) { using (ExcelSheetWriter writer = new ExcelSheetWriter(_inputFile, "AccountDefinition")) { int index = 0; writer.Write(index++, _headings.ToArray()); writer.SetColumnsWidth(12, 35, 35); writer.ApplyHeadingFormat(_headings.Count); writer.WriteList(index, accountDefintionStatements.ToList(), (j, rowIndex) => new object[] { j.AccountType.ToString(), j.Account, j.RecipientAccount, }); } }
public void WriteBalanceSheet(List <BalanceSheetStatement> balanceSheetStatements, string sheetName) { var index = 0; using (var writer = new ExcelSheetWriter(_excelFileName, sheetName)) { writer.Write(index++, headings.ToArray <object>()); writer.SetColumnsWidth(6, 45, 12, 12, 12); writer.ApplyHeadingFormat(headings.Count); writer.WriteList(index, balanceSheetStatements, (b, rowIndex) => new object[] { rowIndex - 1, b.Account, b.GetCreditValueOrNull(), b.GetDebitValueOrNull(), }); index = index + 1 + balanceSheetStatements.Count; writer.Write(index, new object[] { "", "Total", balanceSheetStatements.GetCreditTotal(), balanceSheetStatements.GetDebitTotal(), balanceSheetStatements.GetTotal() }); } }
public void WriteJournal(IList <JournalStatement> journalStatements) { using (ExcelSheetWriter writer = new ExcelSheetWriter(_inputFile, "Journal")) { int index = 0; writer.Write(index++, _headings.ToArray()); writer.SetColumnsWidth(6, 12, 35, 30, 45, 12, 12); writer.ApplyHeadingFormat(_headings.Count); writer.WriteList(index, journalStatements.OrderBy(x => x.Date).ToList(), (j, rowIndex) => new object[] { rowIndex - 1, j.Date, j.Account, j.Tag, j.Description, j.GetCreditValueOrNull(), j.GetDebitValueOrNull(), }); } }
public void WriteTradeLog(IList <TradeStatement> tradeStatement) { using (ExcelSheetWriter writer = new ExcelSheetWriter(_inputFile, "TradeLog")) { int index = 0; writer.Write(index++, _headings.ToArray()); writer.SetColumnsWidth(6, 12, 35, 30, 30, 12, 12, 12); writer.ApplyHeadingFormat(_headings.Count); writer.WriteList(index, tradeStatement.OrderBy(x => x.Date).ToList(), (j, rowIndex) => new object[] { rowIndex - 1, j.Date, j.Name, j.TransactionDetail, j.TransactionTax, j.GetCreditValueOrNull(), j.GetDebitValueOrNull(), }); } }
private void AddOperationButton_Click(OpenApiOperation operation) { ExcelSheetWriter.AddOperationToSheet(operation); }