Excel For Mac How To Import Data From Folder

Importing SecureCRT® Sessions from a Data File

  1. Excel For Mac How To Import Data From Folder To Google Drive
  2. Excel For Mac How To Import Data From Folder Command
  3. Excel For Mac How To Import Data From Folder To Excel Via Power Query
  4. Excel For Mac How To Import Data From Folder To Hard Drive

You can find the Import Arbitrary Data From File To SecureCRT Sessions script discussed in this tip on the VanDyke Software Scripting Forum.

Simply enter a SQL statement, click Run Query to make sure it works. Once it does, click Return Data to drop your data right back into your worksheet. And that’s it; your data is now in your Excel workbook, live and ready to use in Excel 2016 for Mac or Excel for Windows! Working with a third-party data provider works the exact same way. Import a CSV file First, find the file path of the CSV file that you want to import. Find the path to the data (Screenshot by Author) You can either create a new table or add to an existing table (Screenshot by Author). On the File menu, click Import. In the Import dialog box, click the option for the type of file that you want to import, and then click Import. In the Choose a File dialog box, locate and click the CSV, HTML, or text file that you want to use as an external data range, and then click Get Data.

Introduction

Excel

SecureCRT sessions can be imported from an external source if you keep a list of the servers, routers, and other devices that you need to connect to saved in a .csv or other type of data file. With a data file, you can use a script to import the data into SecureCRT sessions, rather than manually creating them one at a time.

In this tip, we explain how to set up an example data file and provide an example script code for you to use and modify for your specific setup. You only need a few basic script-editing skills to get started (more extensive knowledge may be required to customize the example script to meet your needs).

The example script gathers information about your host machines from your .csv data file in order to create the .ini files that will become your SecureCRT sessions. There are comments within the script code explaining the expected format and organization of the data file. The comment lines in the script begin with a single character (a ' single quote or 'tick' character for VBScript and a # character for Python).

The following steps show you how you might use the techniques described in the script to generate sessions from your data file.

Setting up the data file

The first thing you'll need is a data file that contains the host information you wish to import into SecureCRT as sessions. The format below most closely matches the format that the script uses. If your data file only includes some of the information, simply make sure that the header line in your data file includes only those fields that the rest of your data file contains. The following is an example of what your data file might look like:

hostname,protocol,username,folder,emulation
192.168.0.1,SSH2,root,Linux Machines,XTerm
192.168.0.2,SSH2,root,Linux Machines,XTerm
10.0.100.1,SSH1,admin,CISCO Routers,100,VT100
10.0.101.1,SSH1,admin,CISCO Routers,101,VT100
myhost1.domain.com,SSH2,administrator,Windows Servers/1st Floor,VShell
myhost2.domain.com,SSH2,administrator,Windows Servers/2nd Floor,VShell
myhost3.domain.com,SSH2,administrator,Windows Servers/3rd Floor,VShell
myhost4.domain.com,SSH2,administrator,Windows Servers/4th Floor,VShell
For

The first line of your data file names the fields used and their order. In the example above, the header line of the data file is the first line:

hostname,protocol,username,folder,emulation

The remaining lines in the data file are lines that have actual data to be imported, whereas the first line is simply a template that instructs the import script how to interpret the fields on each remaining line.

The example data file shown above uses a comma character as the delimiter between fields, but the script can work using a comma, space, semicolon, or tab as the delimiter. If your delimiter character is not a comma, simply modify the value of the g_strDelimiter variable in the script to match your specific delimiter character(s).

Note: The value of the emulation field must match a valid SecureCRT emulation option as displayed in the Terminal option in the Terminal / Emulation category of the Session Options dialog. However, the following protocols are not currently supported for import using this script: Serial, TAPI, and Raw.

The field keywords that the script is designed to recognize as valid header row components are as follows:

session_nameThe value that will be used for the session’s name. If this field does not exist, the hostname field is used as the session_name.
folderA relative folder path for the specified session (not including the session name) as displayed in the Session manager. Any folder that does not exist will be automatically created as the script runs.
hostnameRequired. The hostname or IP address for the remote server.
protocolRequired. The protocol to be used for connecting with the session (SSH2, SSH1, Telnet, or RLogin).
portThe port on which the remote server is listening.
usernameUsername for the account on the remote server.
emulationThe emulation (vt100, xterm, etc.).
descriptionComment/description. Multiple lines are separated with r.

You might have already noticed that the example data file above doesn't include a session_name field. When there isn't a session_name field, the hostname information will be used as both the hostname and the session name when importing.

Running the script

Once you have made the necessary configuration changes to your data file and/or the script, you can launch the script by opening up SecureCRT and choosing Run... from the main Script pull-down menu.

The first action the script will take is to prompt you for the location of your data (CSV) file.

Once you have specified which data file to use for importing session configurations, the script will attempt to create sessions using the information in your data file. After the work has been completed, the script will write information to a log file and display the contents of the log file.

For example:

After the script has completed, simply close SecureCRT's Session Manager and then open it again to see the sessions that were added.

Note: If a session was found to already exist, the imported session will have a time stamp appended to its name to avoid overwriting any existing sessions that have the same name.

This topic is about creating new dataset sources in NVivo, by importing data from a Microsoft Excel spreadsheet. For example, you might want to import a spreadsheet containing survey responses.

In this release of NVivo for Mac, you cannot import data from text files.

What do you want to do?

Watch the video

Gather your data

You cannot add additional records (rows) or fields (columns) to a dataset after import, so it is important to gather your data before you start the import operation.

For each dataset that you want to create, your data must be gathered into a Microsoft Excel spreadsheet (.xlsx or .xls).

You cannot select multiple worksheets (within a spreadsheet), so the data you want to import must be gathered into a single worksheet.

The maximum amount of data that can be imported into a single dataset is 255 fields (columns) and 100,000 records (rows).

Consider how you want to use your data in NVivo

You cannot change the analysis type (codable or classifying) of a field (column) after import, so you should decide how you want to use your data before you create a new dataset.

Fields that contain data that you intend to code and analyze should be stored as codable fields—for example, responses to open-ended survey questions, such as How do you think we can reduce our carbon emissions?

Fields that describe your data (metadata) should be stored as classifying fields—for example, the ID number, Age, Sex and Annual Income of your survey respondents. Values in classifying fields:

  • Provide context when you view coded dataset content in a node.

  • Can be used to build case structures that group your codable content—for example, by Age or Sex.

  • Can be used to create and classify nodes that represent the subjects (cases) of your research. For example, if you create a 'person' node for a survey respondent, you can use the classifying field values Age or Sex as attribute values on the node.

When you choose to store a field as a classifying field, you may be able to choose from several possible data types—for example, date or text. You cannot change the data type of a classifying field after import.

If you want to create nodes that represent the subjects (cases) in your research—you will need a unique identifier for each subject in your data. If your data does not contain a unique identifier that you can use as a node name, you could add a unique ID number for each subject. This identifier should be imported as a classifying field.

Prepare an Excel spreadsheet for import

  1. Open the spreadsheet file that contains your data in Microsoft Excel.

  1. Ensure that the data is gathered into a single worksheet.

  1. Review your data as described below:

ElementDescription
Blank rowsRemove any blank rows within the data.
Extraneous contentYour file should contain only the rows you want to import, and (optionally) a 1st row containing field labels. Any other content should be removed.
Data typesMake sure every value in a field contains the same type of data. During the import operation, NVivo scans the first 25 rows of your file to determine what data types are appropriate for each field. If you choose to import a field using the date, time, date/time, Boolean, integer or decimal data types, all the rows in your text file must contain valid data for that data type.
If a row after the 25th line, contains invalid data, the import operation will terminate with errors.
For more information about the values that can be store in a particular data type, refer to Valid data types.

Merged cells

Merged cells can cause errors during the import operation. We recommend that you do not import spreadsheets containing merged cells.

Calculated values

If a cell displays a calculated value, the displayed value (not the formula) is imported into the dataset.

Error values

If any of the cells in your worksheet display error values such as #NUM or #DIV, you should correct them before you start the import operation. Columns containing error values can only be imported as text fields—refer to Valid data types for more information.

Buttons and checkboxes

If any cells contain controls such as buttons or checkboxes the spreadsheet cannot be imported. You should remove these controls before import.

  1. Close the spreadsheet. Keeping the file open may cause errors during the import operation.

Top of Page

Import data and create a new dataset

NVivo provides an assistant that guides you through the import process. The assistant examines the data you are importing and helps you to ensure that the data is imported the way that you want.

To create a new dataset:

  1. On the Data tab, in the Import group, click Dataset.

  1. Select the spreadsheet file that contains the data you want to import.

  2. Follow the instructions in the Import Dataset Assistant. For more information about using the Assistant, refer to Import Dataset Assistant steps.

Excel For Mac How To Import Data From Folder To Google Drive

Import Dataset Assistant steps

The information below provides a guide to using each step of the assistant.

Assistant stepDescription

Select the worksheet to import

This step is only displayed if your spreadsheet contains multiple worksheets—select the worksheet that contains the data you want to import. Check the preview to make sure you have selected the right worksheet.

Specify how you want the data to be interpreted

Check the preview to make sure that the dates, times and number in your data are correctly interpreted.

You can use the options on this step of the Assistant to change the way the data is interpreted, and to indicate whether the first row of your data contains column headings (field names).

Time Delimiter If the hours, minutes and seconds in your times are separated by a delimiter character—for example, a colon (:)—enter the delimiter.

Date Delimiter If the days, months and years in your dates are separated by a delimiter character—for example, a slash (/)—enter the delimiter. If the days, months and years are not separated by a delimiter, clear this field.

Date Format The order of day, month and year in your dates—for example, if your file contains the date 10/05/2005 and you select MDY, NVivo interprets the date as 'October 05, 2005'. If you select DMY, NVivo interprets the same date as 'May 10, 2005'. When the data is imported into NVivo, it will be displayed in the date format that is specified in your system preferences (Language & Text).

Four digit years Select this option, if the years in your dates include the century—for example '1999' or '2010'. If the years in your dates do not include the century, clear this check box.

Decimal Symbol The decimal separator that is used in your numbers. When the data is imported into NVivo, it will be displayed with the decimal separator that is specified in your system preferences (Language & Text).

First row contains field names Select this check box when the first row of your spreadsheet contains the names of your columns.

Specify information about each of the fields you are importing

On this screen you can choose which fields contain values that you want to code (codable fields) and which fields contain values that describe your data (classifying fields).

By default, all fields (columns) are imported, and the analysis type (codable or classifying) is preselected based on the content in the first 25 rows of the data.

The preview area shows the values in the first 25 rows and indicates how each field will be imported.

Field Selection You can use these buttons to select or deselect all fields for import. For example, if you want to import only a few fields from a spreadsheet with many columns, you can deselect all fields, and then individually select the fields you want to import.

Check the Field Options for each column because you cannot change this after the data has been imported. To view or change the field options for a column:

  1. Select the column by clicking the header in the preview area.

  2. Review the Field Options and make any changes.

Field Name The field name that will be used for the currently selected field (column) when the new dataset is created. If the first row of your data does not contain column headings, the field names are set to Column A, Column B, Column C etc. You can change these field names to reflect the information in the column.

Import Field Select this check box to import the field. If you clear this check box, the field is not imported.

Analysis Type Choose whether this is a codable or classifying field.

  • Codable Field Contains text you want to analyze—for example, responses to open-ended survey questions.

  • Classifying Field Contains information about the data—for example, the ID number, Sex.Age or Location of survey respondents. You cannot code, query or annotate content in classifying fields.

You cannot change the analysis type after the data has been imported, so you should consider how you want to use your data before you choose the analysis type.

Data Type

  • For codable fields, the data type is always 'Text' and cannot be changed.

  • For classifying fields, the data type is preselected based on the values in the first 25 rows. If more than one data type can be used to store the values in the column, you can change the data type.

Refer to Valid data types for more information about data types.

Decimal Places When the decimal data type is selected, you can choose the number of decimal places—if you reduce the number of decimal places, the data will be truncated.

Enter a name and description for your new dataset

You can change the name and optionally add a description.

Work with your dataset

After importing a dataset, you can use a number of techniques to organize and analyze the data—for example, you could:

Excel For Mac How To Import Data From Folder Command

  • Run a Word Frequency query to get a feel for what respondents are saying.

  • Code the content—select the text in a codable field and code at new or existing nodes.

  • Auto code the dataset to make a node for each survey question and gather all the answers—a useful starting point for further exploration.

  • Auto code the dataset to make a case node for each respondent and gather all of a respondent's answers.

Excel For Mac How To Import Data From Folder To Excel Via Power Query

Refer to Approaches to analyzing survey results for more detailed information.

Excel For Mac How To Import Data From Folder To Hard Drive

Related topics