title: FieldInfo VBA to Google apps script
body: <p>I explain you my problem:</p>
  <p>Before, I need to give you my SpreadSheet :
  <a href="https://docs.google.com/spreadsheets/d/1TtwDP7xadyE8s3u1kQZtKkH8PMJSLZ_0LLmkN5P9i3I/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1TtwDP7xadyE8s3u1kQZtKkH8PMJSLZ_0LLmkN5P9i3I/edit?usp=sharing</a></p>
  <p>I have an initial file that looks like in sheet 1.</p>
  <p>When I execute this macro in VBA that followed these instructions:</p>
  <pre><code>Option Explicit
  Dim file As String
  Dim lig As Integer
  Dim col As Integer
  Dim jj As Integer
  Const r_as= &quot;C:\test\&quot;
  Const r_co = &quot;C:\testestave&quot;
  Const fic = &quot;TCODES_PRODUCTS.xls&quot;
  
  Sub Code_EAN()
  '
  ' Code_EAN Macro
  '
  
  '
      file= r_as400 &amp; fic_pms
  
      Workbooks.OpenText Filename:=file_pms, Origin:=xlMSDOS, StartRow:=1, _
          DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
          Tab:=True, Semicolon:=False, Comma:=False, Space:=False, Other:=False, _
          FieldInfo:=Array(Array(1, 2), Array(2, 1), Array(3, 1), Array(4, 2), Array(5, 1), _
          Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), _
          Array(12, 1), Array(13, 1), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), _
          Array(18, 1)), TrailingMinusNumbers:=True
      lig = Range(&quot;A1&quot;).CurrentRegion.Rows.Count
      col = Range(&quot;A1&quot;).CurrentRegion.Columns.Count
  
  </code></pre>
  <p>I got what there is in sheet 2,</p>
  <p>now look at the column &quot;GENCOD&quot; (column D) :</p>
  <p>We can see that some GENCOD that were in numeric format are now in text format but that 0's are added, and that on the screenshot, on row 7, this was at 1 on the first sheet changes to 0000000000000000000001 on the second sheet while some lines that were at 1 change to 00000000000001.</p>
  <p>I would like to understand why (Instruction FieldInfo:= Array(...Array(4,5) ... )</p>
  <p>And also, if there is a way to convert this instruction to Google Apps Script format so that the data on column D is EXACTLY the same.</p>