/** * @license * Copyright 2022 JsData. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================================== */ import { ExcelInputOptionsNode, ExcelOutputOptionsNode } from "../../shared/types"; import { DataFrame, NDframe, Series } from '../../'; /** * Reads a JSON file from local or remote location into a DataFrame. * @param filePath URL or local file path to JSON file. * @param options Configuration object. Supported options: * - `method`: The HTTP method to use. Defaults to `'GET'`. * - `headers`: Additional headers to send with the request. Supports the `node-fetch` [HeadersInit] * @example * ``` * import { readExcel } from "danfojs-node" * const df = await readExcel("https://raw.githubusercontent.com/test.xlsx") * ``` * @example * ``` * import { readExcel } from "danfojs-node" * const df = await readExcel("https://raw.githubusercontent.com/test.xlsx", { * method: "GET", * headers: { * Accept: "text/csv", * Authorization: "Bearer YWRtaW46YWRtaW4=" * } * }) * ``` * @example * ``` * import { readExcel } from "danfojs-node" * const df = await readExcel("./data/sample.xlsx") * ``` */ declare const $readExcel: (filePath: string, options?: ExcelInputOptionsNode) => Promise; /** * Converts a DataFrame or Series to Excel Sheet. * @param df DataFrame or Series to be converted to JSON. * @param options Configuration object. Supported options: * - `sheetName`: The sheet name to be written to. Defaults to `'Sheet1'`. * - `filePath`: The filePath to be written to. Defaults to `'./output.xlsx'`. * @example * ``` * import { toExcel } from "danfojs-node" * const df = new DataFrame([[1, 2, 3], [4, 5, 6]]) * toExcel(df, { * filePath: "./data/sample.xlsx", * sheetName: "MySheet", * }) * ``` */ declare const $toExcel: (df: NDframe | DataFrame | Series, options?: ExcelOutputOptionsNode | undefined) => void; export { $readExcel, $toExcel };