Dear- The SnP500 list is found at https://en.wikipedia.org/wiki/List_of_S&P_500_companies Now how to convert the list in the webpage to csv format file? Thanks in advance. -Jay
Sir this is impossible ! If you had posted this an hour ago, I could have downloaded the company list from Bloomberg in my office.
Are you sure you want it in csv? As an excel file, you can preserve all the hyperlinks. Just start highlighting from the first row(not the header) and copy/paste to Excel. I rather like the quick links to Edgar and the financial statements.
edit the wikipedia page, copy the table minus the header, paste into a file, sed "s/|-//; s/^\t{{[^|]\+\([^}]\+\).*/\1/; /^$/d" | tr "\n" ","
See attached. Both excel and csv are included. Just remove the extension .txt at the end of the file names before opening them.