How do I save a CSV file without losing leading or trailing zeros?
Administrative Updates for Documents
When performing administrative updates on Documents, Grand Avenue uses the Document Number and Revision values specified in a CSV file to search for the Document(s) to be updated. When the system finds no documents that exactly match the search criteria, the system displays the error message “No such Document exists.”
Importing Documents
Similarly, when importing documents using a CSV file, the resulting Document Number and/or Revision fields in Grand Avenue may not include leading or trailing zeros entered in the CSV import file.
Leading and Trailing Zeros in Numerical Fields
Leading zeros before a decimal point (e.g. 001) and/or trailing zeros after a decimal point (e.g. 1.0) in fields that contain only numbers are a common cause of issues when importing Documents and making administrative updates for Documents. When a CSV file is closed and reopened, Excel reverts numerical fields to the default Number formatting and, consequently, removes leading and trailing zeros.
Example
The two documents shown below require administrative updates, so the Document Number (with leading zeros before the decimal point) and Revision (with trailing zeros after the decimal point) values in the CSV file need to be formatted as Text before saving the file.
Below are views of the same CSV file
CSV file is saved with columns formatted as text | CSV data imports with no errors |
---|---|
Formatting as text is lost when the CSV file is reopened | If the CSV file is saved without text formatting, the data will not import |
---|---|
Instructions for Documents with fields containing leading or trailing zeros
Edit the CSV file.
If columns are formatted as number, Excel does not preserve leading or trailing zeros. To preserve leading and/or trailing zeros, format the Document Number and Revision columns as text.
Enter leading or trailing zeros as needed and save the CSV file.
The CSV file may be left open or closed after it is saved. If the CSV file is closed, do not reopen it before uploading it to Grand Avenue.
Copyright © 2022, Grand Avenue Software, Inc. All rights reserved.