excel - Qt QSqlDatabase -


After searching all day, I did not find the answer to my question. My question is, why does the ODBC driver return the second value, not the first, the code was taken from

, while in the first phase loop considers me two values, but in excellence I have 1. why ?

Any help is appreciated

The code is:

  srcdb.setDatabaseName ("driver = {Microsoft Excel driver (* .xls, * .xlsx, * .xlsm, * .xlsb)}; DBQ = "+++" (getSettings ("folderpath") + '/' + file); if (srcdb.open ()) {QSqlQuery query ("SELECT * FROM [ "+ QString (" Sheet1 ") +" $ A1: A3] "); // Selection Category, Place A1: $ 5 after B5 (query.next ()) {QString column = query.value (0). ToString (); QDebug () & lt; column;}}  

Found it in the wiki:

By default, the first row in the form of the name of the OBDC column If you do yoga, you can change this setting in the 'First Name Name' option in Settings. Keep in mind that you are using a database and each column has its own data type, so if your second line has text and If your third row contains numbers, choose one of these figures in SQL. If there are text in some rows and the remaining numbers are Floating numbers , Then SQL displays the same text and the number disappears.

This is because "2" is shown for the first time


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -