Get List Separator from Client's computer

Discussion in 'Site Programming, Development and Design' started by Gerry, Nov 16, 2017.

  1. I need the client computer's 'list separator' to properly build CSV files for download to that computer.
    What is the right way to get the 'list separator' so that it can be used?
    This is an ASP.Net project using Visual Studio 2017. Coding is in Visual Basic.
    Most pages are built using a single Master Page.
    Thanks for any help!!
     
  2. Elshadriel

    Elshadriel Winhost Staff

    I'm not sure what you mean by 'list separator', but most CSV fields (columns) are delimited by either tab, comma, or white space. It really depends on your data. If any of your data fields allow commas, then it would probably not be a good idea to use commas as the delimiter as it will be more difficult to separate. I personally use tabs myself.
     
  3. Thanks for replying Elshadriel.
    The file could be downloaded to a computer where the 'list separator' (set in Control Panel->Clock, Language and Region->Date, Time or Number Formats->Additional Settings->List Separator) is either a comma or a semi-colon. I wanted to find out which one it was and build the file accordingly.
    I have found a viable solution and that is to build a .TSV (tab separated value) file using tabs as the list separator (much as you suggested). Excel recognises the .tsv extension and opens the file correctly.
     
    Michael and Elshadriel like this.

Share This Page