$title =

Cara Mudah Menggabungkan File CSV dan Excel

;

$content = [

๐Ÿ‡ฎ๐Ÿ‡ฉ Gabungkan Banyak File Excel/CSV dengan Mudah

๐Ÿ”„ Excel & CSV Merger adalah aplikasi ringan berbasis Tkinter yang memungkinkan pengguna menggabungkan banyak file Excel (.xlsx) dan CSV menjadi satu dataset besar dalam format CSV. Cocok untuk membuat dataset besar dari file-file terpisah untuk analisis, visualisasi, atau keperluan lainnya.

๐Ÿ‡ฌ๐Ÿ‡ง Merge Multiple Excel/CSV Files Easily

๐Ÿ”„ Excel & CSV Merger is a lightweight Tkinter-based application that allows users to merge multiple Excel (.xlsx) and CSV files into a single CSV dataset. Ideal for creating large datasets from separate files for analysis, visualization, or other purposes.

โœจ Fitur Utama | Key Features

โœ… Mudah digunakan โ€“ Antarmuka GUI sederhana & intuitif | Easy to use โ€“ Simple and intuitive GUI interface

โœ… Mendukung banyak format โ€“ Bisa gabung file .xlsx & .csv | Supports multiple formats โ€“ Merge .xlsx & .csv files

โœ… Tidak perlu coding โ€“ Klik dan jalankan | No coding required โ€“ Just click and run

โœ… Menggunakan Pandas โ€“ Performa tinggi untuk mengolah data besar | Powered by Pandas โ€“ High-performance data processing

โœ… Hasil dalam format CSV โ€“ Siap untuk analisis & visualisasi | Output in CSV format โ€“ Ready for analysis & visualization

๐Ÿ“ธ Screenshot

image
image
image

๐Ÿ› ๏ธ Tech Stack
โ€ข Python 3.x
โ€ข Tkinter (GUI)
โ€ข Pandas (Data Processing)

๐Ÿ”ฅ Cara Penggunaan | How to Use

1๏ธโƒฃ Pilih folder berisi file Excel/CSV yang ingin digabungkan
      Select a folder containing the Excel/CSV files to be merged

2๏ธโƒฃ Pilih folder tujuan untuk menyimpan file hasil
      Select a destination folder to save the merged file

3๏ธโƒฃ Klik tombol โ€œMerge Filesโ€
      Click the โ€œMerge Filesโ€ button

4๏ธโƒฃ File hasil akan tersimpan dalam format combined.csv di folder tujuan
      The merged file will be saved as combined.csv in the selected folder

๐Ÿ“œ Lisensi | License

๐Ÿ“„ MIT License โ€“ Bebas digunakan, dimodifikasi, dan didistribusikan dengan mencantumkan kredit.
๐Ÿ“„ MIT License โ€“ Free to use, modify, and distribute with proper attribution.

๐Ÿ’ก Kontribusi & Feedback | Contributions & Feedback

import tkinter as tk
from tkinter import filedialog, messagebox
import pandas as pd
import os

def select_input_folder():
    folder_selected = filedialog.askdirectory()
    input_folder_path.set(folder_selected)

def select_output_folder():
    folder_selected = filedialog.askdirectory()
    output_folder_path.set(folder_selected)

def merge_files():
    input_folder = input_folder_path.get()
    output_folder = output_folder_path.get()

    if not input_folder or not output_folder:
        messagebox.showerror("Error", "Please select both input and output folders")
        return

    all_files = [os.path.join(input_folder, f) for f in os.listdir(input_folder) if f.endswith('.xlsx') or f.endswith('.csv')]
    if not all_files:
        messagebox.showerror("Error", "No Excel or CSV files found in the selected folder")
        return

    combined_df = pd.DataFrame()

    for file in all_files:
        if file.endswith('.xlsx'):
            df = pd.read_excel(file)
        elif file.endswith('.csv'):
            df = pd.read_csv(file)
        combined_df = pd.concat([combined_df, df], ignore_index=True)

    output_file = os.path.join(output_folder, 'combined.csv')
    combined_df.to_csv(output_file, index=False)


    messagebox.showinfo("Success", f"Files have been merged and saved to {output_file}")

# Setup the GUI
root = tk.Tk()
root.title("Excel and CSV Merger")

input_folder_path = tk.StringVar()
output_folder_path = tk.StringVar()

frame = tk.Frame(root)
frame.pack(padx=10, pady=10)

tk.Label(frame, text="Select Input Folder:").grid(row=0, column=0, sticky="w")
tk.Entry(frame, textvariable=input_folder_path, width=50).grid(row=0, column=1)
tk.Button(frame, text="Browse", command=select_input_folder).grid(row=0, column=2)

tk.Label(frame, text="Select Output Folder:").grid(row=1, column=0, sticky="w")
tk.Entry(frame, textvariable=output_folder_path, width=50).grid(row=1, column=1)
tk.Button(frame, text="Browse", command=select_output_folder).grid(row=1, column=2)

tk.Button(frame, text="Merge Files", command=merge_files).grid(row=2, columnspan=3, pady=10)

root.mainloop()

];

$date =

;

$category =

,

;

$author =

;