There are many ways to convert an excel file to JSON data. In this tutorial, we will look into two python modules to convert excel files to JSON.
有很多方法可以将excel文件转换为JSON数据。 在本教程中,我们将研究两个将excel文件转换为JSON的python模块。
使用excel2json-3模块将Excel文件转换为JSON文件 (Converting Excel File to JSON Files using excel2json-3 Module)
It’s a very simple module to convert excel files to JSON files. The contents from the excel sheet are converted to JSON string and saved in a file.
这是一个非常简单的模块,可以将excel文件转换为JSON文件。 excel工作表中的内容将转换为JSON字符串并保存在文件中。
The name of the files is derived from the excel sheet names. So, if there are two sheets with the name “Numbers” and “Cars”, the JSON files will be named as Numbers.json and Cars.json respectively.
文件的名称是从excel工作表名称派生的。 因此,如果有两个名为“ Numbers”和“ Cars”的工作表,则JSON文件将分别命名为Numbers.json和Cars.json。
The module supports both .xls and .xlsx file formats for conversion. We can read the excel file from the file system as well as the URL.
该模块支持.xls和.xlsx文件格式进行转换。 我们可以从文件系统以及URL中读取excel文件