When I save a Webi report with data as a CSV file, all of the leading zeros are cut off any numbers when I open the file in Excel. How can I keep the zeros?

This is actually an Excel issue. The program automatically truncates all leading zeros from numbers in CSV files. The key is to change at least the columns where the leading zeros occur (i.e. ORG or Fund numbers) to "text." There are several options to do this. Start with the report open:

Option A (preferred option, most user control)

  1. Click on Save to my computer as
  2. Select either CSV or CSV (with options)
  3. Click Save -- DO NOT OPEN THE CSV FILE DIRECTLY WITH EXCEL!
  4. Open a new worksheet in Excel (see below for Excel screenshots.)
  5. Open the Data tab
  6. Click on the From text button in the Get External Data section
  7. Select your CSV file to import
  8. Select the "Delimited" radio button -- Text Import Wizard, Step 1 determines that your data is delimited
  9. Click Next
  10. Check "Comma" as a delimiter (column dividers will appear in preview)-- Step 2 lets you set delimiters
  11. Click Next
  12. Highlight the column(s) with leading zeros in Step 3
  13. Mark those columns format as "text" by clicking the radio button in the Column Data Format section.  NOTE: You will need to do this for each column where the data contains leading zeros.
  14. Click Finish
  15. The leading zeros will still be there in the new worksheet with the imported data. The columns with real numbers will still be able to be used with calculations.

====================================
Option B

  1. Click on Save to my computer as
  2. Select either CSV or CSV (with options)
  3. Click Save -- DO NOT OPEN THE CSV FILE DIRECTLY WITH EXCEL!
  4. Change the file extension from *.csv to *.txt.
  5. Follow the process #4 through #14 described above.

Successive screen shots of Excel process: