Import From Text File
Import from Text function is used to get data from text or csv file(s).
SheetKraft contains the Import From Text option which can be accessed by the Import From Button present in the SheetKraft Toolbar ( See figure)
The following guidelines describe how data can be imported from text or csv files(s).
Click on the Import From button and select the Text/CSV option to open this dialogue box.
The user can specify if the data is to be imported from a single file or multiple files with similar data structure.
To import data from a single file, hit the browse button to to browse for file location and select the specific file.
Data from multiple files with similar data structure can be imported by selecting the excel range that specifies the file paths.
After selecting the file(s) the File Preview will be loaded. In case of multiple files the File Preview displays the data from the first file.
If a single file is selected, there will be a checkbox below the filepath asking if the File’s location is relative to workbook’s location. If the input data file is expected to be at same location relative to the current workbook, user can check this box. This is useful if user wants to share a current workbook with other users; as long as the relative location stays the same, a new user does not need to re-enter the full file path.
Encoding format used in the file is shown below the filepath details. Sometimes a file might not be imported because it is encoded in a different format. Mostly popular encoding format is UTF-8 but it is possible that a file might be in a different format. SheetKraft tries to identify the encoding on its own. In the remote event when a user sees improper data being displayed in the preview, it is likely that it is because imported file is in a different format. In such cases, user can choose the appropriate format from Encoding drop-down.
User can discard a specified number of lines at the beginning of the file by specifying the number of lines in the field shown in the figure.
The data in the file may be seperated by delimiters. If not a particular column can have a fixed width. If the data is seperated by delimiters, select Delimited under File Type. Then SheetKraft identifies a suitable identifier and displays it as the default value. Also, the user can choose the appropriate delimiter from the drop-down.
If the data is not seperated by delimiters, choose the file type as Fixed Width. Then the user needs to specify the width of each column seperated by comma in the given field.
File has column headers box should be checked if the first row of the input file contains headers. If the file contains headers, the headers can be included or excluded in the imported data by selecting include or exclude respectively.
If only some of columns need to be imported, Import specific columns box can be checked. This enables checkboxes in each column in the Preview File. For the columns that need to be imported, the respective checkbox should be clicked. User can also specify whether select columns are to be imported by name or number. Importing By Name allows users to select columns by column name. Even if file structure changes at a later date, as long as those column names exist, only those select columns names would be imported. Importing By Number allows users to select columns by column number. Regardless of contents in the file structure, only fields in select column numbers would be picked up during import.
User can specify a limit on the number of rows to import into a spreadsheet in the field provided. User might want to replace certain values in the import with a ‘BLANK’ field. The value can be provided in the field provided.
Under Column Specifications, a 100 line preview of the data to be imported will be displayed. The columns can be reordered by selecting a column and drag it across the table. And corresponding to each column there are 4 fields Header, Formats, If Blank and If Error.
Formats field allows users to specify a format for a given column. SheetKraft tries to identify the formats for each column. In case, there are multiple formats then the column field is usually marked as a text field. ‘General’ format can be used to import data of both formats, text, and number. ‘Text’ data is imported in text format and ‘Number’ data is imported in number format.
If Blank field allows users to replace all blank fields in imported dataset with #N/A, 0 or any user specified value . The Default behavior is to import all blank fields with a #/N/A value.
If Error field allows users to replace all error fields in imported dataset with #Value!, #N/A or any user specified value.
After entering all the specifications click Next.
You will be asked where to save the result. To save the data in the Existing WorkSheet, you can input the index of the starting cell where you want to copy the data. Or you can save the data in a New Worksheet.
After entering your choice, click Finish.