Search:     Advanced search

Errors associated with transferring data from the Excel template to the GCE Data Toolbox for MATLAB

Article ID: 138
Last updated: 05 Feb, 2016

For the main instruction on transferring data from the Excel template to the GCE Data Toolbox for MATLAB, refer to the Knowledgebase article "Transferring data from the Excel template to the GCE Data Toolbox for MATLAB." The following are some specific examples of errors and solutions, which can be extrapolated to solve similar errors.

These errors can occur when attempting to import the dataset text file into the MATLAB Toolbox. The corrections to datasets can initially be made in the Excel Coweeta data submission form, but need to be transferred to a text file in Notepad++ and re-imported into the MATLAB Toolbox in order to fix the error(s). Please refer to the Knowledgebase article "Transferring data from the Excel template to the GCE Data Toolbox for MATLAB" for more detailed instructions on the import process.

"An error occurred parsing the file: Error using textscan Mismatch between file and format string. Trouble reading floating point number from file (row 3u, field 8u) = => #VALUE!\n"

  • Usually this error appears when unusual characters are present in the dataset.
  • One possible solution is to look at the file in Notepad++ and search for "#" or "#VALUE!". In this specific case, there were "#VALUE!" cells in the "Tabular Data" tab of the Excel Coweeta data submission form. I replaced the "#VALUE!" with "NaN" in the "Tabular Data" tab.
  • In another example, the character "-" in the dataset was the issue. In order to remove a specific character from a dataset, go to "Find and Select" and then "Find and Replace" in Microsoft Excel, search for the character, and replace it all with "NaN."

"Could not import the file ‘Riparian.Stream.Shading.txt' (Error: the file could not be parsed – values in the following header sections do not match the number of column name fields: datatype)"

  • A solution that worked for this error was copying and pasting all of the data (in every tab) from the data submission form into a new Coweeta data submission form uploaded from the Coweeta LTER website. The data submission form may contain errors.

"Could not import the file 'jackson_site_data_template_newly_created_oct_18_2013.txt' (Error: the file could not be parsed - values in the following header sections do not match the number of column name fields: description)"

  • Look at the Notepad++ file that you imported. For instance, it is possible that some lines in the Notepad++ file start with quotation marks.
  • If, once you paste the data into Notepad++, quotation marks appear the beginning of lines and/or there are lines which do not begin with a header and colon (such as "Study_Instrumentation: Something"), that may be because of carriage returns in the text. You can also note the presence of carriage returns by "CR LF" next to the 'carriage return' lines in Notepad++.
  • If you do have carriage returns in your dataset, you can also fix them in the Excel data submission form by manually deleting the carriage return, and subsequently re-pasting the data into Notepad++.
  • After deleting all of the carriage returns in the Excel data submission template, copy and paste everything from the "IM Use Only (DO NOT DELETE)" tab into Notepad++, and reimport that file back into MATLAB.

"Could not import the file ‘Coweeta.Synoptic.Data1_Oct_22_2013’ (Error: the file could not be parsed – values in the following header sections do match the number of column name fields: units and precision')"

When you get the following error message, there are various adjustments that may be necessary in the dataset (Coweeta data submission form).

  • In the "Tabular Data" tab of the Excel Coweeta data submission form, in the "Precision" row, always fill out columns with no precision as having '0' precision.
  • In the "Tabular Data" tab of the Excel Coweeta data submission form, fill out the "Units" rows for data columns with no units with "none". All of the "Units" rows should be filled out.
  • In addition, make sure the "Tabular Data" tab of the Excel Coweeta data submission form is overall filled out properly. For instance, one instance in which this error appeared, codes were pasted into the "Units" row (such as "1 = present"), instead of actual units.

"Could not import the file ‘jackson_site_data_template_newly_created_oct_18_2013.txt’ (Error: the file could be parsed – one or more header rows are invalid')"

  • Look at the Notepad++ file that you imported. For instance, it is possible that some lines in the Notepad++ file start with quotation marks.
  • If, once you paste the data into Notepad++, quotation marks appear the beginning of lines and/or there are lines which do not begin with a header and colon (such as "Study_Instrumentation: Something"), that may be because of carriage returns in the text. You can also note the presence of carriage returns by "CR LF" next to the 'carriage return' lines in Notepad++.
  • If you do have carriage returns in your dataset, you can also fix them in the Excel data submission form by manually deleting the carriage return, and subsequently re-pasting the data into Notepad++.
  • After deleting all of the carriage returns in the Excel data submission template, copy and paste everything from the "IM Use Only (DO NOT DELETE)" tab into Notepad++, and reimport that file back into MATLAB.

"Errors occurred evaluating flag criteria for column(s): Diameter_of_LWD_at_site_1"

  • This message can indicate that the data type of the specified data column does not actually match the data in the column.
  • For instance, one example when this error appeared, a column which included text comments had the data type "floating-point." Changing the data type to "string" fixed the error.
  • In addition, this type of error can appear when the "QC: Minimum Valid" and "QC: Maximum Valid" rows are invalid. For instance, a "Time" column in a dataset was formatted as a floating point (e.g. 0.465277), but the "QC: Minimum Valid" and "QC: Maximum Valid" were "0:00" and "23:59", respectively. Removing the content in the "QC: Minimum Valid" and "QC: Maximum Valid" rows solved the error.

Article ID: 138
Last updated: 05 Feb, 2016
Revision: 4
Views: 0
Print Export to PDF Subscribe Email to friend Share
Prev   Next
Transferring data from the GCE Data Toolbox for MATLAB to PASTA     Transferring data from the Excel template to the GCE Data...