1
Support Questions / EPPLUS .dll error
« on: July 09, 2018, 12:01:30 AM »
Hello,
Working on a project and can't seem to get rid of this error.
I've updated the EPPLUS to latest version.
I've looked back through my previous post but still no luck.
If anyone could point me in right direction I would appreciate it.
Working on laptop with Win7 Pro 32 bit.
Thanks.
From Debug output window.
Here's everything in the Datasubscriber.
Working on a project and can't seem to get rid of this error.
I've updated the EPPLUS to latest version.
I've looked back through my previous post but still no luck.
If anyone could point me in right direction I would appreciate it.
Working on laptop with Win7 Pro 32 bit.
Thanks.
From Debug output window.
Code: [Select]
Prepare to Read Data
Data Has Been Read
Exception thrown: 'System.ArgumentException' in EPPlus.dll
The thread 0xc70 has exited with code 0 (0x0).
The thread 0x21ec has exited with code 0 (0x0).
The thread 0x27d0 has exited with code 0 (0x0).
The program '[12080] AdvancedHMI.exe' has exited with code 0 (0x0).
Here's everything in the Datasubscriber.
Code: [Select]
Private Sub DataSubscriber1_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber1.DataChanged
If e.ErrorId = 0 AndAlso e.Values.Count > 0 AndAlso e.Values(0) = "True" Then
Console.WriteLine(value:="Prepare to Read Data")
'* Sets MyValues tags equal to PLC Tags
Dim MyValues0 As String = EthernetIPforCLXCom1.Read("Station1_OperatorLog_Serial")
Dim MyValues1 As String = EthernetIPforCLXCom1.Read("Station1_OperatorLog_Name")
Dim MyValues25 As String = EthernetIPforCLXCom1.Read("TimeStamp")
Dim MyValues8 As String = EthernetIPforCLXCom1.Read("MYD10")
Console.WriteLine(value:="Data Has Been Read")
'*Create Excel File & Transfer the Values to Excel
'*Creates Excel file
Using ExcelPackage As New OfficeOpenXml.ExcelPackage(New IO.FileInfo("C:\Users\Owner\Desktop\AdvancedHMIv399x\OP1Login.xlsx"))
ExcelPackage.Workbook.Worksheets.Add(MyValues8)
Console.WriteLine("ws creation ok")
'*Writes the Headers in Row 1
ExcelPackage.Workbook.Worksheets(MyValues0).Cells("A1").Value = "Part Serial Number"
ExcelPackage.Workbook.Worksheets(MyValues1).Cells("B1").Value = "Operator Name"
ExcelPackage.Workbook.Worksheets(MyValues25).Cells("C1").Value = "Date / Time Stamp"
Console.WriteLine("header creation ok")
ExcelPackage.Workbook.Worksheets(MyValues8).Cells("A1").AutoFitColumns()
ExcelPackage.Workbook.Worksheets(MyValues8).Cells("B1").AutoFitColumns()
ExcelPackage.Workbook.Worksheets(MyValues8).Cells("C1").AutoFitColumns()
'*Loops to write data in correct columns
For Index = 0 To MyValues0.Length - 1
Console.WriteLine("Element " & Index & "=" & MyValues0(Index))
Dim ws As OfficeOpenXml.ExcelWorksheet = ExcelPackage.Workbook.Worksheets(MyValues8)
Dim CellNum As String = "A" & (Index + 3)
ws.Cells(CellNum).Value = MyValues0(Index)
Next
'*For Index = 0 To MyValues1.Length - 1
'*Console.WriteLine("Element " & Index & "=" & MyValues1(Index))
'*Dim ws As OfficeOpenXml.ExcelWorksheet = ExcelPackage.Workbook.Worksheets(MyValues8)
'*Dim CellNum As String = "B" & (Index + 3)
'* ws.Cells(CellNum).Value = MyValues1(Index)
'*Next
'*For Index = 0 To MyValues25.Length - 1
'*Console.WriteLine("Element " & Index & "=" & MyValues25(Index))
'* Dim ws As OfficeOpenXml.ExcelWorksheet = ExcelPackage.Workbook.Worksheets(MyValues8)
'* Dim CellNum As String = "C" & (Index + 3)
'* ws.Cells(CellNum).Value = MyValues25(Index)
'* Next
Console.WriteLine("Operator Login OK")
'*Saves.xlsl file
ExcelPackage.Save()
End Using
End If
End Sub
End Class