upxo.interfaces.user_inputs.excel_commons module

Created on Thu May 23 09:36:32 2024

@author: Dr. Sunil Anandatheertha

upxo.interfaces.user_inputs.excel_commons.write_array_to_excel(array, file_name, sheet_name, start_cell)[source]

Writes a 2D NumPy array to an Excel file.

Parameters:
  • array – The 2D NumPy array to write.

  • file_name – The name of the Excel file (existing or new).

  • sheet_name – The name of the sheet to write to.

  • start_cell – The starting cell address (e.g., “A1”).

upxo.interfaces.user_inputs.excel_commons.read_excel_range(file_path, sheet_name, cell_range)[source]

Reads a specific cell range from an Excel file into a pandas DataFrame.

Parameters: file_path (str): The path to the Excel file. sheet_name (str): The sheet name to read from. cell_range (str): The cell range to read (e.g., ‘B2:D10’).

Returns: pd.DataFrame: DataFrame containing the data from the specified cell range.