import * as xlsx from "xlsx";

export function xlsx2csv(data, options) {
    const book = xlsx.read(data, options);
    const sheet = book.Sheets[book.SheetNames[0]];
    const csv = xlsx.utils.sheet_to_csv(sheet)
    return csv;
}
