<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to make the first row as the header??? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192841#M41243</link>
    <description>&lt;P&gt;Hi gzmorgan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;awesome!!! it works,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the great advice :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mario.Choi&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2019 13:52:28 GMT</pubDate>
    <dc:creator>mariochoi</dc:creator>
    <dc:date>2019-04-13T13:52:28Z</dc:date>
    <item>
      <title>How to make the first row as the header???</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192811#M41229</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got in trouble while creating C# JMP automation program,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once opening up a CSV file, I'm not able to find a command to make the first row as the header.&lt;/P&gt;&lt;P&gt;here is my code so far, please give me any idea or help...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JMP.Document doc, doc2;&lt;BR /&gt;JMP.TextImport ti;&lt;BR /&gt;JMP.DataTable jmpDT, jmpRT;&lt;BR /&gt;&lt;BR /&gt;startJMP();&lt;/P&gt;&lt;P&gt;doc = myJMP.OpenDocument(jmpInstallDir + "Samples\\Data\\1111.CSV");&lt;BR /&gt;jmpDT = doc.GetDataTable();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;myJMP.Visible = true;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;jmpDT.SelectRows(0, 49);&lt;BR /&gt;jmpDT.SelectRows(51, 53);&lt;BR /&gt;jmpDT.DeleteSelectedRows();&lt;BR /&gt;jmpDT.SelectRows(1, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 16:52:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192811#M41229</guid>
      <dc:creator>mariochoi</dc:creator>
      <dc:date>2019-04-12T16:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the first row as the header???</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192831#M41239</link>
      <description>&lt;P&gt;I suggest you read the JMP Automation Reference and look up Text Import. Below is an excerpt and a portion of a VB automation example for Text Import.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find JSL easier to use, so you might want to look up how to run JSL within your C script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ColumnNamesStart(StartLine as Integer)&lt;/STRONG&gt;&lt;BR /&gt;Specifies the starting line for column headers. This implies that the file has column headers, so a&lt;BR /&gt;positive value here obviates the need for a call to FirstLineIsData(False). The line that contains&lt;BR /&gt;column names must come before the first line of data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DataStarts(StartLine As Integer)&lt;/STRONG&gt;&lt;BR /&gt;Specifies the starting line for the row data. If the number specified is 1, than it is implied that there&lt;BR /&gt;are no column headers. A call to FirstLineIsData(True) is not necessary in this particular case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;FirstLineIsData(Flag As Boolean)&lt;/STRONG&gt;&lt;BR /&gt;Indicates if the first line of the text file should be interpreted as data or as column headers. True&lt;BR /&gt;means data, False means header.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OpenFile() As Document&lt;/STRONG&gt;&lt;BR /&gt;Opens the text file, using the options specified in the preceding methods. A Document object&lt;BR /&gt;pointer is returned. To retrieve a object pointer to the underlying data table, use the GetDataTable&lt;BR /&gt;method on the document object.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Private Sub TestEOF_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles TestEOF.Click
        TI1 = MyJMP.CreateTextImportObject(InstallDir &amp;amp; "\Samples\Import Data\EOF_space.TXT", 5)
		' Set columns 1 and 3 as having type "Character"
		' The default is "Numeric"
        TI1.SetColumnType(1, JMP.colDataTypeConstants.dtTypeCharacter)
        TI1.SetColumnType(3, JMP.colDataTypeConstants.dtTypeCharacter)
		'Set space as the only end-of-field option
        TI1.SetEndOfFieldOptions(JMP.jmpTIEndOfFieldConstants.tiSpace)
		'Set carriage return line feed as the end-of-line delimeter
        TI1.SetEndOfLineOptions(JMP.jmpTIEndOfLineConstants.tiCRLF)
        TI1.FirstLineIsData(True)
		'Open the file
        Doc1 = TI1.OpenFile
		'Name the document window
        Doc1.Name = "SPACE"
		'Now open two more files.  TI2 gets a file with spaces as
		'end-of-field delimeters, TI3 gets one with commas.
        TI2 = MyJMP.CreateTextImportObject(InstallDir &amp;amp; "\Samples\Import Data\EOF_spaces.TXT", 5)
        TI2.SetColumnType(1, JMP.colDataTypeConstants.dtTypeCharacter)
        TI2.SetColumnType(3, JMP.colDataTypeConstants.dtTypeCharacter)
        TI2.SetEndOfFieldOptions(JMP.jmpTIEndOfFieldConstants.tiSpaces)
        TI2.SetEndOfLineOptions(JMP.jmpTIEndOfLineConstants.tiCRLF)
        TI2.FirstLineIsData(True)
        Doc2 = TI2.OpenFile
        Doc2.Name = "SPACES"
        TI3 = MyJMP.CreateTextImportObject(InstallDir &amp;amp; "\Samples\Import Data\EOF_comma.TXT", 5)
		TI3.SetColumnType(1, JMP.colDataTypeConstants.dtTypeCharacter)
		TI3.SetColumnType(3, JMP.colDataTypeConstants.dtTypeCharacter)
		TI3.SetEndOfFieldOptions((JMP.jmpTIEndOfFieldConstants.tiComma))
		TI3.SetEndOfLineOptions((JMP.jmpTIEndOfLineConstants.tiCRLF))
		TI3.FirstLineIsData((True))
		Doc3 = TI3.OpenFile
		Doc3.Name = "COMMA"
    End Sub&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 19:34:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192831#M41239</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-04-12T19:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make the first row as the header???</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192841#M41243</link>
      <description>&lt;P&gt;Hi gzmorgan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;awesome!!! it works,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the great advice :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mario.Choi&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2019 13:52:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-the-first-row-as-the-header/m-p/192841#M41243</guid>
      <dc:creator>mariochoi</dc:creator>
      <dc:date>2019-04-13T13:52:28Z</dc:date>
    </item>
  </channel>
</rss>

