Skip to content

Instantly share code, notes, and snippets.

@roqbez
roqbez / import_excel.js
Created April 30, 2021 00:00
Node.js + Nest.js code to import Excel file to a database
import { HttpService, Injectable, Logger } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
import { ReadStream } from 'fs';
import { Sequelize } from 'sequelize-typescript';
import * as xlsx from 'xlsx';
import { WorkBook, WorkSheet } from 'xlsx';
import { ArquivoImportacao } from './dto/arquivo-importacao.dto';
@Injectable()
export class ImportacaoProcessosService {