Skip to content

Fast way to convert large .xls/.xlsx files to CSV by saving them via VBS

License

Notifications You must be signed in to change notification settings

willayy/FastXlsToCsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastXlsToCsv

Made by William Norland, 2023

Fast way to convert large .xls/.xlsx files to CSV by saving them via a vbs running via windows script host.

Why?

During a project i did i noticed how slow pandas read excel files to dataframe, because pandas reads csv to dataframe much faster i decied to release my solution for turning excel into csv!

Dependencies

  • Excel (Only tested on excel 2016).
  • Windows operating system (Only tested on Windows 10).
  • Only tested on Python 3.11, should probably work on any python.
  • Windows script host (Exists on pretty much every windows ever).

Usage

Install

Screenshot (2)

Import

Screenshot (3)

Use

inputFile: str = r"c:\Users\someone\Desktop\ExcelFiles\excelFileThatWantsTobeCsv.xlsx"
inputDir: str = r"c:\Users\someone\Desktop\ExcelFiles"
outputDir: str =  r"c:\Users\someone\Desktop\FolderForExportedCsvs"
XlsConverter.convertXlFileToCsv(inputFile, output)
XlsConverter.convertXlDir(inputDir, output)

License

Relased under the MIT License, check FastXlsToCsv/LICENSE for more information.