Setting mime type for excel document

MS Excel has the following observed MIME types: application/vnd.ms-excel (official) application/msexcel application/x-msexcel application/x-ms-excel application/x-excel application/x-dos_ms_excel application/xls application/x-xls application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx) Is there any one type that would work for all versions? If not, do we need to set response.setContentType() with each one of these mime types individually? Also, we use file streaming in our application to … Read more

‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine

I’m trying to get data from an Excel file on a button click event. My connection string is: string connString = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\source\\SiteCore65\\Individual-Data.xls;Extended Properties=Excel 8.0;”; When I click on the button, I got the following error: The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine. I have no clue how to fix this. My … Read more

Is it possible to force Excel recognize UTF-8 CSV files automatically?

I’m developing a part of an application that’s responsible for exporting some data into CSV files. The application always uses UTF-8 because of its multilingual nature at all levels. But opening such CSV files (containing e.g. diacritics, cyrillic letters, Greek letters) in Excel does not achieve the expected results showing something like Г„/Г¤, Г–/Г¶. And … Read more

How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops

How can I use regular expressions in Excel and take advantage of Excel’s powerful grid-like setup for data manipulation? In-cell function to return a matched pattern or replaced value in a string. Sub to loop through a column of data and extract matches to adjacent cells. What setup is necessary? What are Excel’s special characters … Read more