[ manix @ 06.03.2007. 22:37 ] @
Code:
Public Class Form1
    Dim objExel As Excel.Application
    Dim oWB As Excel.Workbook
    Dim oSheet As Excel.Worksheet

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        objExel = CreateObject("Excel.Application")
        objExel.Visible = True
        Dim xx As Excel.XlWBATemplate
        xx = Excel.XlWBATemplate.xlWBATWorksheet
        oWB = objExel.Workbooks.Add(xx) ''Ovde javlja gresku "Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))"
        oSheet = oWB.ActiveSheet
    End Sub
End Class


Da li neko ima reeeeseeenje???
[ manix @ 06.03.2007. 22:48 ] @
Ljudi postavio sam pitanje pre 10 min , posle 2 sata pretrage po netu, a sada sam nasao resenje.

Code:
        Dim oExc As New Excel.Application()
        oExc.Visible = True
        oExc.UserControl = True
        Dim oBooks As Object = oExc.Workbooks
        Dim ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-US")
        oBooks.GetType().InvokeMember("Add", Reflection.BindingFlags.InvokeMethod, Nothing, oBooks, Nothing, ci)


Pa ako nekom' ztreba tu je!

Pozdrav
[ manix @ 08.03.2007. 00:35 ] @
Zapravo

Code:
Dim oExc As New Excel.Application()
oExc.Visible = True
oExc.UserControl = True
Dim oldCI As System.Globalization.CultureInfo = _
    System.Threading.Thread.CurrentThread.CurrentCulture
System.Threading.Thread.CurrentThread.CurrentCulture = _
    New System.Globalization.CultureInfo("en-US")

' Excel comande ....

System.Threading.Thread.CurrentThread.CurrentCulture = oldCI


Ali ima drugi problem: format odredjene kolone???

Znaci, iz VB-a posaljem podatak sa 15 cifara kao string a u Excelu je ta kolona Standard i on ga
tretira kao number i dobije nesto tips 3,69854E+14...
kako da resim problem??

hvala unapred!