Skip to content

This script processes updated product data and merges it with existing exported data.

Notifications You must be signed in to change notification settings

AhmadMWaddah/Update_XLS_To_CSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This script processes updated product data and merges it with existing exported data.

Key functionalities:

  • Reads updated data: Loads updated product data from an Excel file (.xls or .xlsx) and extracts relevant columns ('Code' and 'Qty').
  • Preprocesses updated data: Cleans and formats SKU codes ('Code') to ensure consistency.
  • Reads exported data: Loads exported product data from a CSV file and extracts relevant columns.
  • Preprocesses exported data: Cleans SKU codes ('Variant SKU') and converts non-zero inventory quantities to zero.
  • Merges data: Merges updated and exported data based on SKU codes, updating inventory quantities ('Variant Inventory Qty') where applicable.
  • Updates published status: Sets the 'Published' column based on inventory quantity values.
  • Saves output: Saves the processed data to a new CSV file.

File structure:

The script expects the following files in the same directory:

  • Updated_Data.xls or Updated_Data.xlsx: Contains updated product data.
  • Exported_Data.csv: Contains exported product data.

Output:

  • Exported_Data_Processed.csv: Contains the updated exported data with merged quantities and published status.
  • Updated_Data_Processed.xls: Contains the preprocessed updated data.

Dependencies:

  • os
  • openpyxl
  • pandas
  • re
  • xlrd

About

This script processes updated product data and merges it with existing exported data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages