Importing special characters

I am working on importing boring data from an Excel file.  In our blow counts fields, we sometimes indicate blows per inches (when it is other than 6 in.).  For instance the first blow count might read 100/1" or WOH/12".  But I'm finding that the inch symbol (") is not being imported.  The field type in gINT is identified as text.  Any ideas?

Thank you!

  • Hello Tabha,

    From what you described above, I am assuming you are importing the data from excel into gINT where the inch (") symbol is being edited in the excel spreadsheet. 

    Here is the sample that I tried doing and it seems to be working.  My field property for the blow count was also set to Text.

    What version are you using?  You might want to upgrade your gINT to the latest and give it a try.

    I am sure you are familiar with the import between Excel and gINT.  Here is a link to another post on our community that explains the same.

    http://communities.bentley.com/products/geotechnical1/w/wiki/3864

  • Thank you for your thoughtful response Aparna. I see that copying and pasting from Excel will save the " mark. I was hoping to find a solution for importing, though, because when I have 150 borings, it can be tedious copying and pasting the sample table for each boring, when I am successfully importing the data for all the other tables. Thank you for the link; I also checked the Import-Export item in Help, but no luck there.

    TABHA

  • This happens because the double quote is interpreted as a text delimiter when gINT converts the excel file to an access database before it imports it into your project. My approach to this is to never use " or any other special character anywhere in gINT. ie write it out...50/6 in. I do this because quotes and special characters (including superscripts and subscripts) cause problems when exporting data to other programs such as other databases, data analysis programs, or CAD. each program treats quotes and special characters differently. If you want to use the double quotes the following might help.

    1. Preceed the double quote with a single quote for example 50/6'". You can do this in excel with a search and replace. This may not be the best solution nor a desired solution for your application but it often works. I tried it and it worked for me in one file but not in another.

    2. If your excel spreadsheet has protection turned on, turn it off, save it, and try your import. This may solve the problem because it allows the database import engine to look at all rows to guess the field type. I tried this and it worked for me but I have very unusual files that I import from. I also have number 3 below set on my machine which may have helped this work in this case. In this case all quotes were imported literally as text and I did not have to preceed the double quote with a single quote.

    3. By default the Microsoft Jet engine looks at the first 8 rows of an excel spreadsheet to make a guess at the field type to assign when it converts it to an access database. It has to do this because there is no field type assigned in excel and access requires a field type to be assigned. This happens even though you have a field type assigned in gINT because gINT does this intermediate step before it even looks at the gINT project field type or the correspondence file. Thus if the first 8 rows contain numbers it will guess wrong and treat the quote as a text delimiter. You can change this default behavior by modifying a registry key. If you are uncomfortable modifying the registry then don't do this; but it is really quite easy and I have never had any problems with it. use the instructions below.
    a. Close any programs that are running
    b. On the start menu click “Run” and then type “regedit" in the dialog box and click OK. This will start the registry editor.
    c. For windows 7, Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Excel\
    Other versions may have it located elsewhere. You can search for the DWORD below.
    d. Select “TypeGuessRows” and click Edit menu, Modify. This will bring up the Edit DWORD Value dialog. You may have to add the DWORD if it is not present
    e. In the edit DWORD value dialog box, click “decimal” under base and enter 0 (zero) for value data.
    f. Click OK and then close the registry editor

    4. I have found the above described behavior is not always consistant so you will have to try to see what works consistantly for your specific excel file. One inconsistency seems to be that the first time you do an import in a gINT session behaves differently than the second time you do an import (which may have to do with that temporary access file). SO simply doing your import twice may solve your problem (You will have to select an overwrite option if you import the same file twice or delete the original data). Try it by importing the same file twice and then close gINT restart and import again. the second import will behave differently than the first import or the import after closing gINT and restarting.

    Good luck
  • Thank you for your suggestions Szang. I agree, it is indeed inconsistent. I tested each of your options (except the registry one) and the only consistent solution was to import the data; then add the double-quotation mark in one field; then re-import the data into the same file. The re-import results in the quotation marks being imported successfully. Thanks again.

    TABHA