import: specs for the PDF, XLSX, and chart parsers; chart header on the first non-blank row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
48ccc20e03
commit
26fd0af1cf
3 files changed
+44
-1
No files matched your search
@@ -163,6 +163,19 @@ fn number(
|
||||
}
|
||||
|
||||
/// Render a report to XLSX bytes.
|
||||
///
|
||||
/// ```text
|
||||
/// GOAL: a statement as a spreadsheet a CPA can sum and check.
|
||||
/// SOURCE: docs/spec/sources/xlsx-numbers.md (a cell number is a binary
|
||||
/// double; Excel honors 15 significant digits).
|
||||
/// INVARIANTS:
|
||||
/// 1. An amount is a number cell, in an accounting format (thousands
|
||||
/// separators, negatives in parentheses), unless Excel couldn't show
|
||||
/// it exactly (finer than a cent, or past 15 digits): then its exact
|
||||
/// text, right-aligned. NEVER a number Excel would show wrong.
|
||||
/// 2. Every statement row is a row, in order, with its label.
|
||||
/// 3. The output is a valid XLSX (a zip holding a workbook).
|
||||
/// ```
|
||||
pub fn report_to_xlsx(report: &XlsxReport<'_>, meta: &ReportMeta) -> Result<Vec<u8>, XlsxError> {
|
||||
let mut workbook = Workbook::new();
|
||||
let sheet = workbook.add_worksheet();
|
||||
|
||||
Reference in new issue
Block a user