All Questions
6 questions
0
votes
1
answer
132
views
How to combine CSVs with different columns?
I have multiple CSV files and I need to combine all of them into 1 CSV file.
So, for example:
1.csv has data like below:
Roll no
Name
1
Abc
2
xyz
2.csv has data like below:
Name
Date
Score
...
11
votes
5
answers
14k
views
How to exclude header when writing data to CSV
I am writing my data from a public class to a CSV file. As I want to append my data, I want to exclude the importing of header and only import the data from the class. My code below imports both ...
1
vote
3
answers
7k
views
Checking if CSV file is empty / avoiding having an exception be thrown
If I call csv.Read() on a CSV file that is completely empty, I get an exception. Is there a way to check the CSV without having to fall back on a Catch block?
var csv = new CsvReader(csvFile);
try
{
...
0
votes
1
answer
2k
views
c# CSVHelper read CSV with variable headers
First time using the csvReader - note it requires a custom class that defines the Headers found in the CSV file.
class DataRecord
{
//Should have properties which correspond to the Column Names ...
1
vote
0
answers
158
views
Adding the first new DataGridView row does not update the DataSource
When I add a new row to a DataGridView, the row is not saved to the DataView or DataTable. But when I add another row after that, that row is added. The first new row is completely ignored. I have no ...
2
votes
1
answer
7k
views
CsvReader to ignore blank column
I am using CSVhelper for the first time. Another program is exporting a csv file the file looks like this
,"Employee","Earnings 1/Rate","Note"
,"John Doe","Regular 10.50", "Started Sep 1"
The ...