import * as OOXML from 'ooxml-types'; /** * https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.metadatarecord?view=openxml-3.0.1 * * ah, mixing 0-based and 1-based indexes. that's great. not at all confusing. */ export interface MetadataRecord { t: number; v: number; } /** * https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.metadatatype?view=openxml-3.0.1 * * punting on all these attributes for now, except the ones we specifically * want. */ export interface MetadataType { name: string; cell_meta?: boolean; } /** * the type `Future Feature Data Storage Area` is not actually defined? not * sure. maybe it's just a standard extension type and I need to look that up? * * for the time being we'll use a list of flags... */ export interface MetadataFlags { 'dynamic-array'?: boolean; } /** * https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.futuremetadata?view=openxml-3.0.1 * https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.futuremetadatablock?view=openxml-3.0.1 * * these are named, matching the names in "MetadataType"; we'll use those * as indexes, and not store them in the object. * */ export interface FutureMetadata { flags: MetadataFlags; } /** * we're just reflecting the actual data at this point, not simplifying * (although we should simplify). will require some lookups. */ export interface Metadata { cell_metadata: MetadataRecord[]; metadata_types: MetadataType[]; future_metadata: Record; } export declare const LookupMetadata: (source: Metadata, type: "cell" | "value", index: number) => FutureMetadata; export declare const ParseMetadataXML: (root: OOXML.Metadata) => Metadata;