UNPKG

excel2json

Version:
32 lines (31 loc) 855 B
/** * @fileOverview cell converter * @name cell * @author Yuhei Aihara */ import libxmljs, { Document, Element, StringMap } from 'libxmljs'; interface Coord { cell: string; column: string; row: number; } export interface Cell extends Coord { value: string; } interface CustomElement extends Element { get(xpath: string, ns_uri?: string): Element | null; get(xpath: string, ns_uri?: StringMap): Element | null; } export interface CustomDocument extends Document { find(xpath: string, namespaces?: StringMap): CustomElement[]; } export interface ProcessSendData { start?: number; end?: number; strings?: string; sheets?: string; ns?: StringMap; exit?: boolean; } declare const _default: (cellNodes: CustomElement[], strings: CustomDocument, ns: libxmljs.StringMap) => Cell[]; export default _default;