Hello everyone, I am copying a CSV file to paste it into an Excel template file. However I have a small concern about a column where data must be numbers and not text. When I do it manually it works, however when I do it via my automation I have this error:
Number stored as text
Do you know how I can paste my data without having to change all the cells?
I’m not sure if I’ve understood your query completely, but do you want Excel to categorize it as a Number is that correct?
If so then using a bit of VBA wouldn’t hurt here.
Function changeColFormat(str_sheetName As String, Col As Long)
Dim Sh As Worksheet
Set Sh = ThisWorkbook.Worksheets(str_sheetName)
Set Sh = ThisWorkbook.Worksheets("Sheet1")
Sh.Columns(Col).NumberFormat = "0.00"
End Function
Check the box for “Trust Access” in Trust Center