How to disable SYLK warning for CSV files in Excel?

I load a lot of CSV files into Excel and some of them cause the warning where Excel thinks it's a SYLK file, not CSV. The cause is known.

enter image description here

How does one disable this warning? Is there a setting, a group policy, registry setting? Anything?


Solution 1:

We have discovered if CSV is changed to UTF-8, the SYLK problem disapears (without change ID to Id)

Solution 2:

The issue is caused by the first cell/field on the first row having the exact value 'ID' in it. Excel looks for this value and decides it is a SYLK (SYmbolic LinK) file format and not a CSV file.

This 'feature' can be overcome by renaming the value 'Id' or 'id' - as the value Excel looks for must be in uppercase. Alternatively, use any other string value 'Identity' or 'Ref' or insert an apostrophe in front of ID, to tell Excel to treat the value as 'plain text' - this defeats the Excel check, but you may not want an apostrophe in your data.

This feature has been in Excel since at least the 2010 version.

Solution 3:

We fought this where I work. One of the workarounds was to save the file locally, as in our instance, the security (this is a security issue, believe it or not) check was only triggered for network files. While Excel conducted the check, the operating system did not. Don;t save in any office format, and it may drop the "domain/zone/region/whatever" information from the file. I'll ask around, see if there's more. I do recall that there was a GPO setting, but we were not allowed to touch it, hence the ugly workaround.

Solution 4:

I found this bad Excel behavior also. Appears to happen if: 1 File is CSV (and trying to open in Excel) 2 First 2 chars are ID (upper case). Editing in notepad let me recover may data.

If there are multiple columns, Excel (version 2016) would open the file with error warnings.

Solution 5:

I am using a macro to convert text files to XLSX and this problem was a show stopper due to the error popups. I tried the convert to UTF-8, but then my pipe delimiter was not recognized. After trying may different things, I finally found a very simple solution.

I hope this helps those of you who have been pulling your hair out over this!

Application.DisplayAlerts = False
Workbooks.Open Filename:=folderName & "\" & myfile, Format:=6, Delimiter:="|"
Application.DisplayAlerts = True

By simply adding the DisplayAlerts statements, it powered right through the popups and handled my file correctly.

Annette