/** * [[include:src/codecs/xlsx/README.md]] * * @module codecs/xlsx */ /** * Hello contributor 👋! If you are working on this file, please * endeavor to remove the need for the following `eslint-disable` line 🙏. * Remove the line and run `npx eslint path/to/this/file.ts` to * see which code needs some linting ❤️. * See https://github.com/stencila/encoda/issues/199 for suggestions * on how to refactor code to avoid non-strict boolean expressions. */ import stencila from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec, CommonEncodeOptions } from '../types'; export declare class XlsxCodec extends Codec implements Codec { readonly mediaTypes: string[]; readonly decode: (file: vfile.VFile) => Promise; readonly encode: (node: stencila.Node, { format }?: CommonEncodeOptions) => Promise; } /** * Convert a column index (e.g. `27`) into a name (e.g. `AA`) * * Thanks to https://stackoverflow.com/a/182924. * * @param index The column index */ export declare function columnIndexToName(index: number): string; /** * Convert a column name (e.g. `AA`) into an index (e.g. `27`) * * Thanks to https://stackoverflow.com/a/46173864. * * @param name The column name */ export declare function columnNameToIndex(name: string): number; /** * Convert a cell name e.g. `A2` to a position e.g. `[0, 1]` * * @param name The name of the cell */ export declare function cellNameToPosition(name: string): [number, number]; /** * Convert a cell position e.g. `[0, 1]` to a name e.g. `A2` * * @param position The position of the cell */ export declare function cellPositionToName(position: [number, number]): string;