Tab Delimited Text


#1

I’m having trouble getting a text file to import properly into a Panorama database. Each record gets loaded into the first field.

The text file has tabs separating the fields, chr(9), and returns separating the records, chr(13). I’ve confirmed that the tabs exist and compared the file to others.

Other text files that are formatted with the very same characters import just fine. What could it be about this file?


#2

I can duplicate this, if I put a line with no tabs at the top. It could be nothing more than a single carriage return preceding the text.


#3

Thanks David, you nailed it.


#4

I believe Pan 6 (X too?) scans the first line during import and uses its structure to determine delimiters. If there are none (blank line), it treats subsequent lines like one field.

I’ve run into this several times in the past. Just add a dummy header with text spaced with the correct number of tabs to the top of the imported text file before importing it (either during the import process or manually), then delete this line after importing (again, either manually or programmatically).


#5

If there are none, it treats it as comma delimited. If subsequent lines have any commas, that’s where the break between fields will occur.


#6

Yeah, I was wondering about the default when the first line was blank. Now that you mention it, I do recall data in that situation coming in comma-delimited.