This script processes an Excel file, groups data based on a specific column, and creates new Excel files for each group. It also generates a summary sheet.
- Node.js installed on your machine 🌐
- npm package manager 📦
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git
-
Install dependencies:
npm install
Run the script with the following command:
node excelProcessor.js /path/to/your/excel/file.xlsx
Replace /path/to/your/excel/file.xlsx
with the actual path to your Excel file.
The script uses Node.js and several npm packages, including XLSX and XlsxPopulate, to process Excel files. It performs the following steps:
- Reads the Excel file.
- Groups data based on a specified column (in this case, 'الجهة').
- Creates a new workbook for each group, applying styling and adding a summary row.
- Generates a summary sheet with information about each created sheet.
js/
: Contains utility functions and data used by the main script.excelProcessor.js
: The main script for processing Excel files.
- Modify the script to suit your specific Excel file structure.
- Adjust the path to the Excel file, column names, and other parameters as needed.
Important
- This script is specifically crafted to handle Excel sheets containing tables with a predefined header.
- The required headers are: [الاسم, الرقم القومى, الجهة, المبلغ, التوقيع], as illustrated in the accompanying image.
This project is licensed under the MIT License - see the LICENSE file for details.