How to perform better document version control on Excel files and SQL schema files

The answer I have written here can be applied in this case. A tool called xls2txt can provide human-readable output from .xls files. So in short, you should put this to your .gitattributes file: *.xls diff=xls And in the .git/config: [diff “xls”] binary = true textconv = /path/to/xls2txt Of course, I’m sure you can find … Read more

MS Access VBA Error: Run time error ’70’ Permission Denied

From Microsoft: This issue is by design, as of the July security updates. This control is blocked as a security measure to help prevent malicious code from running in Office applications. We are working on getting a knowledgebase article out with the recommended method. Until that KB is ready, I’ll post the content here: Workaround … Read more

How to read data from excel file using c# [duplicate]

There is the option to use OleDB and use the Excel sheets like datatables in a database… Just an example….. string con = @”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\temp\test.xls;” + @”Extended Properties=”Excel 8.0;HDR=Yes;””; using(OleDbConnection connection = new OleDbConnection(con)) { connection.Open(); OleDbCommand command = new OleDbCommand(“select * from [Sheet1$]”, connection); using(OleDbDataReader dr = command.ExecuteReader()) { while(dr.Read()) { var row1Col0 = … Read more

Automating Office via Windows Service on Server 2008

I’ve had problems automating Office from a Windows Service under Windows Server 2008, even though that works fine under Windows Server 2003. The problem also occurs at the Open call, so it may be the same problem. I tried following the advice given by H Ogawa in this MSDN thread, and it seemed to work. … Read more

Difference between Microsoft.Jet.OleDb and Microsoft.Ace.OleDb

It’s mainly a matter of history, effectively ACE has superceded JET: Wikipedia answers your question in great detail. The most relevant sections are: With version 2007 onwards, Access includes an Office-specific version of Jet, initially called the Office Access Connectivity Engine (ACE), but which is now called the Access Database Engine. This engine is fully … Read more

How to detect installed version of MS-Office?

One way to check for the installed Office version would be to check the InstallRoot registry keys for the Office applications of interest. For example, if you would like to check whether Word 2007 is installed you should check for the presence of the following Registry key: HKLM\Software\Microsoft\Office\12.0\Word\InstallRoot::Path This entry contains the path to the … Read more

tech