Error while running logstash config file

I am new to Kibana and want to import data from Excel. I was told to get Logstash and create a config file (Below is the file). When executing I get this error message. Please advise
Thanks
bin/logstash agent -f logstash.conf
fetched an invalid config {:config=>"\n", :reason=>"Expected one of #, input, filter, output at line 2, column 1 (byte 2) after \n", :level=>:error}

input {
file {
path => "/users/cwp/x.csv"
type => "core"
start_position => "Beginning"
}
}
filter {
csv {
columns => ["@timestamp", "interface", "bytes in", "bytes out"]
separator => ","
}
}
output {
elasticsearch {
action => "index"
host => "localhost"
index => "logstash-%{+YYYY.MM.dd}"
workers => 1
}
# stdout {
# codec => rubydebug
# }

Path is an array - https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-path

path => ["/users/cwp/x.csv"] should fix it

Path is an array

Yes, but strings are actually accepted too.

One problem seems to be that the output section is never closed, i.e. there's a missing closing brace at the end of the file. However, the error message indicates a problem at the beginning of the file. I suggest the OP closely examines the beginning of the file to see if there are any garbage characters there. Running the configuration file through hexdump -C might be useful.