
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@imrandil/csv-to-excel-converter
Advanced tools
A simple npm package for converting CSV files to Excel (XLSX) format efficiently using streams.
A simple and efficient Node.js module for converting CSV files to Excel (XLSX) format using streams. This package leverages the power of csv-parser and exceljs libraries to handle large datasets efficiently without consuming too much memory.
npm install @imrandil/csv-to-excel-converter
const csvToExcel = require('@imrandil/csv-to-excel-converter');
const header = null; // Use null to extract headers from the CSV file
const inputFilePath = './path/to/input.csv';
const outPutFilePath = './path/to/output.xlsx';
csvToExcel(header, inputFilePath, outPutFilePath);
const csvToExcel = require('@imrandil/csv-to-excel-converter');
const header = [
{ header: 'id', key: 'id', width: 15 },
{ header: 'is_active', key: 'is_active', width: 10 },
{ header: 'created_date', key: 'created_date', width: 25 },
{ header: 'last_modified_date', key: 'last_modified_date', width: 25 },
{ header: 'unique_id', key: 'unique_id', width: 20 },
// add more headers as needed
];
const inputFilePath = './path/to/input.csv';
const outPutFilePath = './path/to/output.xlsx';
csvToExcel(header, inputFilePath, outPutFilePath);
header: An array of objects containing headers (optional). If not provided, headers will be extracted from the CSV file.inputFilePath: The path to the input CSV file (required).outPutFilePath: The path to the output Excel file (required).Easily migrate data from legacy systems that export data in CSV format to systems that accept Excel files.
Generate Excel reports from CSV data for better readability and data manipulation.
Convert CSV files from data analysis tools into Excel format for further analysis with tools like Excel or Google Sheets.
The module performs validation on input and output paths and provides meaningful error messages for the user.
try {
csvToExcel(header, inputFilePath, outPutFilePath);
} catch (error) {
console.error('Error processing CSV to Excel:', error.message);
}
Contributions are welcome! Please submit a pull request or open an issue to discuss improvements or features.
This project is licensed under the MIT License.
With this package, converting CSV files to Excel format is a breeze. It efficiently handles large datasets and offers flexibility with optional headers. Perfect for data migration, reporting, and analysis!
For more information, issues, or contributions, visit our GitHub repository.
Developed by Ali Imran Adil.
If you have any questions or need support, feel free to open an issue on GitHub.
FAQs
A simple npm package for converting CSV files to Excel (XLSX) format efficiently using streams.
The npm package @imrandil/csv-to-excel-converter receives a total of 10 weekly downloads. As such, @imrandil/csv-to-excel-converter popularity was classified as not popular.
We found that @imrandil/csv-to-excel-converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.