Severity Code Description Project File Line Suppression State Warning Could not determine the dependencies of the COM reference "Microsoft.Office.Interop.Excel". Chyba při načítání knihovny typů či DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) V2Solution I dont known where is a problem, 0 errors, 1 warnings. Thank you
<pre>Public Shared Sub updatelog() Dim formattedDate As String = Date.Today.ToString("dd/MM/yyyy") Dim OnlyTime As String = DateTime.Now.ToString("HH:mm:ss") Dim cislod As String cislod = iMontix.TextBox1.Text Dim zakazc As String zakazc = iMontix.TextBox2.Text Dim stav As String stav = "OK" Dim ID = iMontix.TextBox6.Text Dim kod_operace = iMontix.TextBox8.Text Dim smena = iMontix.TextBox5.Text Dim filename = "C:\_Montix a.s. - cloud\iMontix\logfile_V1.xls" Dim sheetname = "V1" If IO.File.Exists(filename) Then Dim Proceed As Boolean = False Dim xlApp As Excel.Application = Nothing Dim xlWorkBooks As Excel.Workbooks = Nothing Dim xlWorkBook As Excel.Workbook = Nothing Dim xlWorkSheet As Excel.Worksheet = Nothing Dim xlWorkSheets As Excel.Sheets = Nothing Dim xlCells As Excel.Range = Nothing xlApp.DisplayAlerts = False xlWorkBooks = xlApp.Workbooks xlWorkBook = xlWorkBooks.Open(filename) xlApp.Visible = True xlWorkSheets = xlWorkBook.Sheets For x As Integer = 1 To xlWorkSheets.Count xlWorkSheet = CType(xlWorkSheets(x), Excel.Worksheet) If xlWorkSheet.Name = sheetname Then Console.WriteLine(sheetname) Proceed = True Exit For End If Runtime.InteropServices.Marshal.FinalReleaseComObject(xlWorkSheet) xlWorkSheet = Nothing Next If Proceed Then xlWorkSheet.Range(xlWorkSheet.Cells(2, 2)).Value = cislod xlWorkSheet.Range(xlWorkSheet.Cells(2, 3)).Value = zakazc xlWorkSheet.Range(xlWorkSheet.Cells(2, 4)).Value = stav xlWorkSheet.Range(xlWorkSheet.Cells(2, 5)).Value = formattedDate xlWorkSheet.Range(xlWorkSheet.Cells(2, 6)).Value = OnlyTime xlWorkSheet.Range(xlWorkSheet.Cells(2, 7)).Value = ID xlWorkSheet.Range(xlWorkSheet.Cells(2, 8)).Value = smena xlWorkSheet.Range(xlWorkSheet.Cells(2, 9)).Value = kod_operace 'save changes xlWorkBook.Save() xlWorkSheet.Activate() Else MessageBox.Show(sheetname & " not found.") End If Else MessageBox.Show("'" & filename & "' not located. Try one of the write examples first.") End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)