Icon

Excel 97-2003 Import - KNIME Forum (77371)

<p>Import a TXT file with .xls ending. Also import an Excel 97-2003 file that has been saved from LibreOffice or with Python package xlwt<br><br>- import with the Excel Reader<br>- import with Python, Pandas and xlrd<br>- import with R and readxl<br><br><br>You will need these Python packages<br><br>conda install -n py3_knime -c conda-forge xlrd<br>conda install -n py3_knime -c conda-forge xlwt</p>

URL: KNIME and Python — Setting up and managing Conda environments https://medium.com/p/2ac217792539
URL: Import a TXT file with .xls ending. Also import an Excel 97-2003 file that has been saved from LibreOffice or with Python package xlwt https://forum.knime.com/t/read-excel-97-2003-files-that-have-a-format-problem-with-python/77371/5?u=mlauber71

Import a TXT file with .xls ending. Also import an Excel 97-2003 file that has been saved from LibreOffice or with Python package xlwt

https://forum.knime.com/t/read-excel-97-2003-files-that-have-a-format-problem-with-python/77371/5?u=mlauber71

You will need these Python packages

conda install -n py3_knime -c conda-forge xlrd

conda install -n py3_knime -c conda-forge xlwt

library(readxl)xls_file_path <- paste0(knime.flow.in[["context.workflow.data-path"]], knime.flow.in[["xsl_file_name"]])df <- read_excel(xls_file_path, sheet = 1)knime.out <- as.data.frame(df)
R Snippet
Merge Variables
locate and create /data/ folder with absolute paths
Collect Local Metadata
20230714141942_Excel97.table
Table Writer
Name_Excel_sheet
Java Edit Variable (simple)
20230714141942_Excel97.xls
Excel Reader
20230714141942.xlsthis is in fact a text file
File Reader
xsl_file_name20230714141942_Excel97.xlsexported with xlwt
Table Creator
20230714141942_2007.table
Table Writer
keep 1,000rows
Row Filter
Time
String to Date&Time
Date
String to Date&Time
Time
String to Date&Time
Date
String to Date&Time
Activate Conda Environmentbased on Operating SystemWindows or macOS
py3_knime_xl
v_excel_97_path
Create File/Folder Variables
String to Number (PMML)
export data to an Excel 97-2003 fileconda install -n py3_knime -c conda-forge xlwt
Python Script
=> import Excel 97-2003 sheet with xlrdconda install -n py3_knime -c conda-forge xlrd
Python Script
20230714141942_2007.xlsx
Excel Writer
Table Row to Variable

Nodes

Extensions

Links