<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Caramba!</p>
    <p>That did the trick indeed! Added a field "dummy" and some numbers
      in the next rows and gave it a try: Tada! All headers there.</p>
    <p>So: All-string tables will not be imported correctly. Always e.g.
      add an id-field with number</p>
    <p>Thanx a ton!</p>
    <p>Bernd<br>
    </p>
    <div class="moz-cite-prefix">Am 12.03.22 um 23:04 schrieb Jonas
      Küpper:<br>
    </div>
    <blockquote type="cite"
      cite="mid:7b0ef20a-3c0d-a409-e05c-c94b53bb6a37@carvedworks.de">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi Bernd,</p>
      <p>for what its worth: I experienced these Field1, Field2 troubles
        recently as well. The problem is that gdal apparently does not
        assume headers in a table, if all columns are string data. What
        usually fixes that for me is to add a dummy column where the
        first row (the header) is a string eg. "dummy" but all the
        subsequent rows are numbers. i stumbled over this behavior in
        the sources <a moz-do-not-send="true"
href="https://github.com/OSGeo/gdal/blob/1a30b3fab043a918e78cac7cc035ddc2670a9ba9/ogr/ogrsf_frmts/xlsx/ogrxlsxdatasource.cpp#L575"
          class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/blob/1a30b3fab043a918e78cac7cc035ddc2670a9ba9/ogr/ogrsf_frmts/xlsx/ogrxlsxdatasource.cpp#L575</a>
        .<br>
      </p>
      <p>what should have fixed it as well would be to pass
        OGR_XLSX_HEADERS = FORCE to the provider while loading
        xlsx-files but a i couldn't find a way how to do that. (see <a
          moz-do-not-send="true"
          href="https://gdal.org/drivers/vector/xlsx.html"
          class="moz-txt-link-freetext">https://gdal.org/drivers/vector/xlsx.html</a>)</p>
      <p>Cheers</p>
      <p>Jonas<br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 11.03.2022 21:52, Bernd
        Vogelgesang wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:3c86cb95-6178-0176-dad2-dd01c6ff1faa@gmx.de">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <div dir="auto">Hi Chris,<br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">mhm.</div>
        <div dir="auto">There are only two columns with ordinary names.</div>
        <div dir="auto">The data holds some special characters, and
          first I thought this might influence the process as well. But
          the version where I deleted those entries does not behave
          differently.</div>
        <div dir="auto">Very strange.<br>
        </div>
        <br>
        <div dir="auto">Meanwhile, I exported the file to a csv,
          imported this one successfully and then saved as gpkg. So at
          least, the data is in and working.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Thanks,</div>
        <div dir="auto">Bernd<br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div class="moz-cite-prefix">Am 11.03.22 um 21:38 schrieb chris
          hermansen:<br>
        </div>
        <blockquote type="cite"
cite="mid:CACc2_69=fVAySBudMDRJBthZ7x39fzapp=j+zTtzZM4EnWxGCQ@mail.gmail.com">
          <meta http-equiv="content-type" content="text/html;
            charset=UTF-8">
          <div dir="auto">
            <div>Bernd and list,<br>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Fri, Mar 11, 2022,
                  12:08 Bernd Vogelgesang via Qgis-user <<a
                    href="mailto:qgis-user@lists.osgeo.org"
                    moz-do-not-send="true" class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
                  folks,<br>
                  <br>
                  for quite some time, I hold frequently changing data
                  in a xlsx-file.<br>
                  Working in a spreadsheet application is so much more
                  efficient sometimes.<br>
                  <br>
                  This spreadsheet easily imports by drag and drop, the
                  import dialog pops<br>
                  up where to choose which tab to import, and finally
                  the table is there<br>
                  with the first row as column heads.<br>
                  <br>
                  Now, I'm getting just nuts.<br>
                  <br>
                  I'm trying to do the same with other data, and
                  whatever I try, it<br>
                  imports the table ignoring the header row, so its
                  Field1, Field2...<br>
                  <br>
                  Findings so far:<br>
                  <br>
                  I had a long file name. With this, there was no import
                  dialog, but the<br>
                  first tab was imported immediately, but without the
                  header row.<br>
                  <br>
                  I saved the file with a short file name, and now the
                  import dialog asks<br>
                  which tab to import. But still, the first data-row is
                  ignored.<br>
                  <br>
                  Dragging my other already existing file into that
                  project works just<br>
                  perfectly.<br>
                  <br>
                  What could be the reason for this behaviour?<br>
                </blockquote>
              </div>
            </div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">Clutching at straws here...</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">Sometimes when making a pivot table in
              LibreOffice calc I notice that column headings (first row)
              aren't interpreted as such.</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">This seems to occur on the following
              scenarios:</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">1) a column has an en empty cell in row 1
              (or missing title)</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">2) a column exists outside the area of
              interest with no header (this probably would not apply in
              your case, but maybe you have some calculations to the
              right of your data which don't have a column header)</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">3) there are some "strange" characters in
              one or more header fields (I can't recall precisely what
              constitutes "strange")</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">What you might want to do is save a copy of
              your spreadsheet, then delete anything to the left or
              right of your columns, and check that your column names
              are all "legal variable" names ie begin with a letter,
              only letters and numbers</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">I hope this helps; good luck!</div>
            <div dir="auto"><br>
            </div>
            <div dir="auto">Chris</div>
          </div>
        </blockquote>
      </blockquote>
    </blockquote>
  </body>
</html>