I have an excel file with cells containing several values. I try to input this file into a python code to use the mentioned data, but i have the following error: *TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'*
.
However, I can't find a single instance of either, and this error surprises me as I only have digits in my file, but the command CTRL+F indicates I do have a "**" in each cell, without being able to see it. This code is already working for other .xlsx .csv files, so I don't think this comes from the code.
If tried to use CTRL+H to replace these "**", but it replaces the whole cell with the new character I use, as if all the digits were referring to those asterisks.
I tried to show the functions, without more success.
I tried the following VBA code:
Sub RemoveAsterisks()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If InStr(cell.Value, "**") > 0 Then
cell.Value = Replace(cell.Value, "**", "A")
End If
Next cell
End Sub
I tried to copy and paste all the values (and the values only) and put it in a new spread sheet. Same issue.
I tried the "=SUBSTITUTE()"
function.
I tried to copy and paste a cell into another text editor.
Nothing worked. Thus, I don't know how to read this file...
Can you help me? Thanks in advance.