02-10-2006 12:41 PM
02-10-2006 12:56 PM
You will have more control if you read the file as simple string, then do the parsing manally. Read from spreadsheet file does not work well if you have a mix of data types anyway.
How is the file structured? Do all "lines" contain the same number of characters? Any patterns? What seperates the fields (tab, spaces, etc.)
Please attach a simple version of your data file (e.g. the first 100 lines) and we'll figure out the best way.
02-10-2006 01:17 PM
I have attached a sample file. All lines may not contain the same number of characters. The pattern is as follows :
First few rows are for comments (string that can run up 100's of charaters)
Next row is a header (remains the same always)
Next few rows are data separated by tabs. The row length may vary, but the number of columns are fixed.
I hope this helps.
Thanks.
Note: The file extension is .xls in this example. In my actual code, the file extension is .dat.
02-10-2006 02:28 PM
02-10-2006 03:58 PM
02-10-2006 04:13 PM
I agree with altenbach. I would read in the lines as straight text and parse later.
02-10-2006 04:20 PM
02-10-2006 04:23 PM
02-10-2006 04:35 PM