Comments (4)
And also, in case we dont talk again let me say thanks a lot for your support of csv helper. were huge fans.
from csvhelper.
That's not a valid CSV file.
You can handle this by setting the trim option TrimOptions = TrimOptions.Trim
from csvhelper.
Got it. I suspected that was the situation but thanks for confirming.
I've noticed that Excel seems to almost always open CSVs (even invalid ones). For whatever reason, it is just very relaxed in the set of inputs it can accept. Is there any documentation on the collection of config options we should employ via your SDK to essentially accept even malformed csvs, or said another way how can we replicate excel's behavior?
from csvhelper.
There is no set of things. Typically, you want to know when things aren't working as expected.
Setting TrimOptions = TrimOptions.Trim | TrimOptions.InsideQuotes
should be pretty safe. You can set what is trimmed via the WhiteSpaceChars
setting. By default it's just a space character.
You can change the behavior of BadDataFound
to just ignore the issue with BadDataFound = null
, but depending on the reason, it could mess up the rest of the read. You might want to log when this happens or something.
from csvhelper.
Related Issues (20)
- Just thrown new exception by choice.
- Unexpected `InvalidCastException` in `TypeConverter<>` with nullable structs and value types HOT 2
- List<T>.ToAsyncEnumerable not accessible anymore after upgrade to CSVHelper 31.0.2 (.NET 8) HOT 5
- Set Custom Headers that derives from the property value. HOT 7
- Eliminate the columns if empty HOT 1
- Unregister ClassMap does not clear the previous maps if the same class is used HOT 2
- Getting problems with release build of my app using COM HOT 1
- add my report list columns' name as a header to the csv file when the HasHeaderRecord is set to false
- When Query from db and return IEnumable, will execute 2 times for sql query HOT 3
- Validate Header generate a very large message. HOT 2
- Header does not contain Quote, but some fields in row contain Quote, how should I read this kind of CSV HOT 4
- FastDynamicObject broke serialization HOT 7
- Using a ClassMap with custom type converter results in a "newed" object. HOT 1
- Using Custom TypeConverter causes dangerous/spurious CsvWriter behavior
- csv helper is writing 1 to 12 datetime in different format and 13 to 24 in different datetime format using version 4.0.30319 HOT 1
- FastDynamicObject ignores headers while used together with CsvWriter HOT 1
- Microsoft.Bcl.AsyncInterfaces dependency issue HOT 5
- [Feature request] Anonymous type and dictionary support HOT 1
- CsvWriter.WriteRecordsAsync does not dispose e.g. EF Core AsyncEnumerators
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csvhelper.