Contents



Opening CSV-Formatted Files Correctly in ExcelProcurement Business Intelligence Service (PBIS) OSD, AT&L, DPAPVersion 1.002/10/2017Contents TOC \o "1-3" \h \z \u Contents PAGEREF _Toc474491595 \h 2Objective / Scope PAGEREF _Toc474491596 \h 3Purpose PAGEREF _Toc474491597 \h 3Approach PAGEREF _Toc474491598 \h 3Method 1: Open as a text file in Excel PAGEREF _Toc474491599 \h 4Step 1: Change the file extension of the CSV-formatted file. PAGEREF _Toc474491600 \h 4Step 2: Open the file from Excel. PAGEREF _Toc474491601 \h 6Step 3: Follow the Text Import Wizard. PAGEREF _Toc474491602 \h 8Step 4: Save the Excel file. PAGEREF _Toc474491603 \h 9Step 5 (optional): Change settings back to hide file extensions. PAGEREF _Toc474491604 \h 10Method 2: Import data into Excel using Text Import Wizard PAGEREF _Toc474491605 \h 11Step 1: Import the data into Excel. PAGEREF _Toc474491606 \h 11Step 2: Follow the Text Import Wizard. PAGEREF _Toc474491607 \h 12Step 3: Save the Excel file. PAGEREF _Toc474491608 \h 14Summary PAGEREF _Toc474491609 \h 15Objective / ScopeThe main objective of this document is to provide instructions for correctly opening data saved in the comma separated values (CSV) file format in Microsoft Excel, while preserving leading zeroes.Important: Do not open a CSV-formatted file directly from Excel. Doing so will change any fields that Excel thinks is a number into the actual Excel number format, which will drop leading zeroes.PurposeThis document provides two different methods for correctly opening CSV-formatted files in Excel. Both have the same end result, so users can decide which method works best for them.ApproachThere are two options for correctly opening a CSV-formatted file in Excel. The first method requires changing the file extension from .csv to .txt before opening the file in Excel. The second method leaves the file extension as is and imports the data into a blank Excel workbook using the Text Import Wizard. Both options start with a CSV-formatted file and finish with an Excel workbook file that can be used however you wish. You should choose only one of the methods to follow.Method 1: Open as a text file in ExcelStep 1: Change the file extension of the CSV-formatted file.Navigate to your CSV-formatted file using Windows Explorer.To show file extensions if they are not already visible: Go to the Start menu and open the Control Panel. Type “Folder Options” in the search box. Click on “Folder Options.” (Note: In Windows 10, this link will be called “File Explorer Options” instead.) In the dialog box that opens, click on the second tab named “View.” Uncheck the box labeled “Hide extensions for known file types.” Click “OK.”If you plan to change your computer setting back so that file extensions are once again hidden after opening the file, leave the Control Panel window open. Otherwise, close the Control Panel window.If file extensions are already visible or after you have made them visible: Go to the Windows Explorer window displaying the folder that contains your CSV-formatted file. Right-click on the file name and choose “Rename.” Replace the file extension “.csv” with “.txt” and click Enter. Click “Yes” in the warning dialog box to allow the change. Step 2: Open the file from Excel.Open a blank workbook in Excel. This will either open by default when launching the Excel application, or you can choose “Blank Workbook” from the template icons on the opening screen.Choose “Open” from the File menu and navigate to your folder in the Open dialog box. The text file will not be found in the folder initially because it does not have an Excel file extension. Change the dropdown box to the right of the File name box from “All Excel Files” to “All Files.” Then the text file will be available for selection. Choose the text file and click “Open.”Step 3: Follow the Text Import Wizard.On the first window of the Text Import Wizard dialog box, ensure that “Delimited” is selected instead of “Fixed width” under the Original data type section and the box is checked for “My data has headers.” Click “Next.”On the second window of the wizard, change the selection under the Delimiters heading by unchecking the box for “Tab” and checking the box for “Comma.” Click “Next.”On the third window of the wizard, the first step is to highlight all the columns of data in the preview pane at the bottom of the wizard. Do this by selecting the first column, scrolling right until the last column is visible, and holding the Shift key while selecting the last column of data. The second step is to select the “Text” option under the Column data format heading. Lastly, click “Finish.” This opens the spreadsheet with all columns formatted as text.Keep the file with your data open. Close the blank Excel workbook you opened initially. Step 4: Save the Excel file.To save the workbook with your data as an Excel file, go to the File menu, choose “Save As,” and navigate to your folder. Change the dropdown menu for Save as type from “Unicode Text” to “Excel Workbook.” Click “Save.”Step 5 (optional): Change settings back to hide file extensions.Go back to the Control Panel window. Type “Folder Options” in the search box. Click on “Folder Options” (or “File Explorer Options” if you are using Windows 10). In the dialog box that opens, click on the second tab named “View.” Check the box labeled “Hide extensions for known file types.” Click “OK.” Close the Control Panel window.Method 2: Import data into Excel using Text Import WizardStep 1: Import the data into Excel.First open a blank workbook in Excel. This will either open by default when launching the Excel application, or you can choose “Blank Workbook” from the template icons on the opening screen.Click on the Data menu and choose “From Text” in the Get External Data section.Navigate to your folder in the Import Text File dialog box. Choose your CSV-formatted file and click “Import.”Step 2: Follow the Text Import Wizard.On the first window of the Text Import Wizard dialog box, ensure that “Delimited” is selected instead of “Fixed width” under the Original data type section and the box is checked for “My data has headers.” Click “Next.”On the second window of the wizard, change the selection under the Delimiters heading by unchecking the box for “Tab” and checking the box for “Comma.” Click “Next.”On the third window of the wizard, the first step is to highlight all the columns of data in the preview pane at the bottom of the wizard. Do this by selecting the first column, scrolling right until the last column is visible, and holding the Shift key while selecting the last column of data. The second step is to select the “Text” option under the Column data format heading. Lastly, click “Finish.”When prompted for where to put the data, ensure that “Existing Worksheet” is selected and the cell reference is “=$A$1”. Click “OK.” This opens the spreadsheet with all columns formatted as text.Step 3: Save the Excel file.To save the workbook, go to the File menu, choose “Save As,” and navigate to your folder. Keep the default file type, which is Excel Workbook. Click “Save.”SummaryThis document provided two methods for correctly opening a CSV-formatted file in Excel without losing the leading zeroes in the data. Either method can be used to produce an Excel workbook file with all columns formatted as text. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download