You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
408 B
19 lines
408 B
2 years ago
|
import reader from 'xlsx';
|
||
|
|
||
|
const file = reader.readFile('prisma/salaries.xlsx');
|
||
|
|
||
|
export const COMPANIES: Array<CompanyData> = []
|
||
|
|
||
|
type CompanyData = {
|
||
|
Finalized: string;
|
||
|
description: string;
|
||
|
logoUrl: string;
|
||
|
name: string;
|
||
|
slug: string;
|
||
|
website: string;
|
||
|
};
|
||
|
|
||
|
const temp = reader.utils.sheet_to_json(file.Sheets[file.SheetNames[1]]);
|
||
|
temp.forEach((res: CompanyData) => {
|
||
|
COMPANIES.push(res);
|
||
|
});
|