SOLVED

Prevent Excel from adding = to CSV files upon opening?

Copper Contributor

In our learning management system, we have to add a hyphen to the front of some online course titles to ensure they are sorted properly in the catalog. (A hyphen must be used because it is one of the only characters that is ignored by assistive technologies like screen readers.) The issue we're encountering is, when we export our course information to a CSV file and open it in Excel, Excel automatically adds an equals sign (=) at the beginning of any course title cells that begin with a hyphen, and it gives us a #Name? error. It does this regardless of the number formatting assigned to the column because, presumably, Excel is adding the = as soon as it opens the CSV file. (I have confirmed that the = is not already in file, by opening it in Notepad; there are no equal signs in front of those course titles.)

 

We're able to remove the equal sign using  Find & Select | Replace feature on that column, but is there a way to prevent Excel from doing this, such as under File | Options? I have checked there and tried turning off a few options, but nothing fixes it. 

 

Thank you in advance for your help,

LSpirko

2 Replies
best response confirmed by lspirko (Copper Contributor)
Solution

@lspirko 

Do not open CSV files with Excel. Instead import them, either with the text import assistant or with Power Query (best choice!) and set the data type to text for this field.

@Detlef Lewin -- Thank you for your prompt and very helpful response! I had no idea you can import data from a CSV instead of open it, but this seems to be have worked! I'll convey these steps to our LMS administrator. Much appreciated! LSpirko

1 best response

Accepted Solutions
best response confirmed by lspirko (Copper Contributor)
Solution

@lspirko 

Do not open CSV files with Excel. Instead import them, either with the text import assistant or with Power Query (best choice!) and set the data type to text for this field.

View solution in original post