✅ Reading .csv files correctly
hey im trying to read a .csv file correctly by sorting the different values etc insied of it, two of those values are revenue and price and im trying to add all that up into my varible but i ends up as 0 all the time does anyone know what im doing wrong
the format of the csv file is like this:
"Id,Buyer User Id,Date and Time,Location,Location Id,Universe Id,Universe,Asset Id,Asset Name,Asset Type,Hold Status,Revenue,Price"
26 Replies
First deserialize that CSV into a list of objects
Then do with that list whatever you want, sorting, summing, aggregating, whatever
alright i'' try that
https://joshclose.github.io/CsvHelper/ this library might be useful
why cant i download CsVHelper?
nvm got it
i have no idea but this has completely fucked my program
no litterally nothing at all works..
@ZZZZZZZZZZZZZZZZZZZZZZZZZ
Meaning?
Errors?
Unintended behaviour?
What exactly did you do?
Just installing this library broke things?
Any other code you changed?
no i tried to use
this crap
and impelemnt it
and boom
litterally 0 works
n o values gets added
not even a simple + works
That is a class, yes
What's the code that's supposed to work but doesn't?
it sssupposed to run through the .csv file and collect info such as how many sales, where the sales have been, revenue and price
and it does litterally nothing
nowww
it doesnt update any values or anything
sounds like your code is wrong then
well without the classes it was working for the msot part
so either im doing this class stuff wrong or idk
it's probably that
did you read the documentation for how to use csvhelper?
^^ this was the only part of my code that wasnt working properly before
now its everything
yup
well, you did something wrong
i use this library for csv data and it's fine
well how do you correctly sort the data?
if "nothing works" then you shouldn't be thinking about sorting right now
the first step is to correctly load the data in the first place
wym "load" the data
theres nothing to load
theres data to go throguh
through*
so why are you doing anything with a CSV
if there is no data
jesus crist
the data you need to load is in the CSV
ill do it myself
suit yourself i guess
"load" in this context means to read the csv file into memory
you cant go through it without loading it
i don't see any sorting in the posted code either, so there are some terminology issues happening
he left the thread it seems?
the server
their loss