CSV file reader/viewer/editor

Results 1 to 2 of 2

Thread: CSV file reader/viewer/editor

  1. #1
    Join Date
    Dec 1969

    Default CSV file reader/viewer/editor

    This is not specifically an ASP question, but this seemed the best place to ask since I can&#039;t believe I&#039;m the only person ever to have had this problem. Since it&#039;s a data management issue, I decided on the database forum.<BR><BR>CSV files are quite difficult to read "column by column" in notepad (as there are no columns), and opening them in Excel introduces several other headaches that don&#039;t seem to have a solution. For example, Excel will change the text "20040114161325" to "2.00401E+13" and save it as that text/number/whatever back into the CSV file. Excel also shaves off leading zeroes, treating text enclosed in quotes as a number anyway.<BR><BR>I&#039;ve never used any of the MS Office alternatives, and wanted to get some expert opinions before going that route with possibly no result.<BR><BR>Is anyone aware of a program that will open a CSV file as text just like notepad, but arranged into columns like Excel? For various reasons, creating an ASP page to do this is not a solution, rather a piece of shareware seems the best option. Download.com and other similar sites have nothing. Any ideas?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Would be a tiny little program...

    The one thing you do *not* want to do is use ADO to treat the CSV file as a database. You way Excel changes the form of numbers; not so. It&#039;s the process of converting a string (in the CSV file) into a number that does this. It&#039;s a natural result of doing such a conversion. The number is simply too big to represent as an integer, so it *must* be converted to floating point. And when you do that, you lose accuracy.<BR><BR>So you want to simply open the CSV file as a text file and then parse it. The parsing is pretty simple. The display and/or printing is pretty simple.<BR><BR>I doubt that this would be much more than a page or two long if written in VB (any version).<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts