Importing Tab Delimited Data File


#1

In Panorama 6, I used to import a tab delimited data file into it. In Panorama X, it doesn’t anything with it. I can use that same file and open with Excel with no issue. Any clues?


#2

Importing of TSV files works perfectly, only the commands have slightly changed. Open the Panorama X Help and check the new importtext statement and its options.


#3

Does this mean that you can’t use: File:New:Database from Text File?

In Jim’s original demo of PanoramaX he used that statement to open CSV text file.


#4

I just used File:New:Database from Text File, on a tab delimited file, and it worked as advertised. The file does need to have an extension, such as .txt or .tsv, to be recognized as a text file. Panorama X doesn’t recognize the old type/creator codes.

Dave


#5

Dave,

Interestingly my file is 105 mg in size,File:New:Database from Text File, on a tab delimited file I can seem to get that functionality to work.
In the finder, if I choose open with Panorama it opens without issue at all either .txt or .tsv interesting isn’t it.


#6

Does this mean that you can’t use: File:New:Database from Text File?

No. You naturally can do that manually with menu commands.

But if you have to import such a file every day or this would be only part of a complex workflow, maybe you would enjoy it if a procedure would do that task for you. And when you are going to write such a procedure, you would make use of the statement importusing and its options.


#7

It will make sense to use importusing for the future workflow and I will play with that.

Thanks again


#8

As a point of interest, when you choose File>New>New Database from Text File Panorama actually runs this program internally:

local fileChoice
choosefiledialog fileChoice
if fileChoice = {} rtn endif
newdatabase
importtext binarytotext(fileload(fileChoice)),{ExistingData},{Replace}

Many, in fact perhaps most, of Panorama’s apparently “built-in” menus and tools actually run short programs internally.

Also notice that nowhere does this program explicitly create any database fields. The importtext statement will do this automatically (unless you tell it not to).