A .csv file is just a text file with the column data being separated by the list separator character defined in your control panel, regional and language options.
Many places define it as the semicolon character ( ; ).
Usually the very first row written in the csv file, contains the column title, but is not required. All the data written in the file is text, so numeric values sould be formatted using the right format. You can use the System.Globalization.CurrentUICulture to obtain the right formatting characters for you.
Is recommended to have the file UTF encoded in order to support 2 byte string characters for languages others than English.
If you read the line in a string array, you can cicle over the string.Chars array to coun them using some thing like:
' This is an untested code
' Also is assumming you are using the Microsoft.VisualBasic namespace
Dim TabsCount as Integer = 0 ' this will return the number of tabs at the beginning
Dim CharacterPosition as Integer = 0 ' this will be the pointer to the character array
While CharacterPosition < InputLine.Length And InputLine.Chars(CharacterPosition) = ControlChars.Tab ' this will stop counting if you reach the end of line or a character other than tab
TabsCount +=1 ' increase the counter
Hope this helps. If this solved your question, please be so kind to mark this thread as solved.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...