You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't tell if this is intentional, but I am using ExcelDataFactory.CreateCsvReader(fileStream) and when I read a .csv file that contains a space:
Header1,Header2,Header3
value1, ,value3
It is automatically trimmed, so that when I store the value in a string, instead of the value being a literal space, it is an empty string. The workaround is to ensure the value is set as a literal space in the .csv file like so:
Header1,Header2,Header3
value1," ",value3
If you take a look an alternative tool, like the Microsoft.VisualBasic.IO.TextFieldParser, it allows for the TrimWhiteSpace bool to be set to true or false. Setting it to false will cause a value like , , to be read as a literal space.
The text was updated successfully, but these errors were encountered:
I can't tell if this is intentional, but I am using
ExcelDataFactory.CreateCsvReader(fileStream)
and when I read a .csv file that contains a space:It is automatically trimmed, so that when I store the value in a string, instead of the value being a literal space, it is an empty string. The workaround is to ensure the value is set as a literal space in the .csv file like so:
If you take a look an alternative tool, like the
Microsoft.VisualBasic.IO.TextFieldParser
, it allows for theTrimWhiteSpace
bool to be set to true or false. Setting it to false will cause a value like, ,
to be read as a literal space.The text was updated successfully, but these errors were encountered: