IxiRancid Posted June 16, 2004 Posted June 16, 2004 This would mostly be like a warning or a help to every non-american native user of VS.NET I had this problem trying to open an Excel workbook to pump some data into. The error pops up if your Office system is english version and regional settings are non-US. You could use Multilanguage pack, however my company has a policy of not installing those packs, so I found this solution: ------taken from microsoft.com (here) -------- Dim oApp As New Excel.Application() oApp.Visible = True oApp.UserControl = True Dim oBooks As Object = oApp.Workbooks Dim ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-US") oBooks.GetType().InvokeMember("Add", Reflection.BindingFlags.InvokeMethod, Nothing, oBooks, Nothing, ci) -------------------------------------- Now that would be the solution part, however I have a problem with continuing the code... I can't start inserting data into rows and cells. The Excel and a workbook open fine, but the data won't go in. Any suggestions? Thanks Quote
olehansen Posted July 24, 2009 Posted July 24, 2009 Think I found a solution here: http://www.made4dotnet.com/Default.aspx?tabid=141&aid=15 Quote
themhz Posted April 20, 2010 Posted April 20, 2010 C:\Program Files\Microsoft Office\OFFICE11 and copy the Excel.exe and paste it in the same directory. Rename the new file xllex.dll and wala! excelobj.Workbooks.Open("anyfile.xls") will work ;) Quote
Recommended Posts