Database changes and access through code
This commit is contained in:
parent
c8aef97c61
commit
73d92f9354
BIN
Databas.xlsx
BIN
Databas.xlsx
Binary file not shown.
Binary file not shown.
|
|
@ -1,8 +1,9 @@
|
||||||
Imports XCCLibrary
|
Imports XCCLibrary
|
||||||
|
Imports Excel = Microsoft.Office.Interop.Excel
|
||||||
|
|
||||||
Public Class GUI
|
Public Class GUI
|
||||||
'Public Shared filepath As String = "C:\Users\Anton\Documents\Exjobb"
|
Public Shared filepath As String = "C:\Users\Anton\Documents\Exjobb"
|
||||||
Public Shared filepath As String = "C:\Users\xperd\OneDrive\Dokument\Exjobb"
|
'Public Shared filepath As String = "C:\Users\xperd\OneDrive\Dokument\Exjobb"
|
||||||
|
|
||||||
Dim filesFolder As String = filepath ' Hämta från settings
|
Dim filesFolder As String = filepath ' Hämta från settings
|
||||||
Dim HLCtFolder As String = filepath & "\X2021" ' Hämta från settings
|
Dim HLCtFolder As String = filepath & "\X2021" ' Hämta från settings
|
||||||
|
|
@ -37,6 +38,10 @@ Public Class GUI
|
||||||
Dim angleFunctionActive As Boolean = False
|
Dim angleFunctionActive As Boolean = False
|
||||||
Dim squareFunctionActive As Boolean = False
|
Dim squareFunctionActive As Boolean = False
|
||||||
|
|
||||||
|
Dim excelApp As Excel.Application = New Excel.Application
|
||||||
|
Dim excelWB As Excel.Workbook
|
||||||
|
Dim excelSheet As Excel.Worksheet
|
||||||
|
|
||||||
' --- Start method (main) for GUI ---
|
' --- Start method (main) for GUI ---
|
||||||
Sub GUI_load() Handles MyBase.Load
|
Sub GUI_load() Handles MyBase.Load
|
||||||
containerPanel = DrawingPanel
|
containerPanel = DrawingPanel
|
||||||
|
|
@ -675,7 +680,16 @@ Public Class GUI
|
||||||
|
|
||||||
' --- Settings button clicked ---
|
' --- Settings button clicked ---
|
||||||
Private Sub SettingsButton_Click(sender As Object, e As EventArgs) Handles SettingsButton.Click
|
Private Sub SettingsButton_Click(sender As Object, e As EventArgs) Handles SettingsButton.Click
|
||||||
Program.Update_KB()
|
'Program.Update_KB()
|
||||||
|
|
||||||
|
excelWB = excelApp.Workbooks.Open(HLCtFolder & "\Databas.xlsx")
|
||||||
|
|
||||||
|
excelSheet = excelWB.Sheets("Pressure_welded") 'Call sheet by name
|
||||||
|
'excelSheet = excelWB.Sheets(1) 'Call sheet by number
|
||||||
|
|
||||||
|
Dim temp1 As String = excelSheet.Range("A64").Value 'Call cell by name
|
||||||
|
Dim temp2 As Excel.XlPattern = excelSheet.Cells(79, 1).style.interior.pattern 'Call cell by row and column index
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' --- When export to SW button is pressed ---
|
' --- When export to SW button is pressed ---
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,24 @@
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<COMReference Include="Microsoft.Office.Core">
|
||||||
|
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
|
||||||
|
<VersionMajor>2</VersionMajor>
|
||||||
|
<VersionMinor>8</VersionMinor>
|
||||||
|
<Lcid>0</Lcid>
|
||||||
|
<WrapperTool>primary</WrapperTool>
|
||||||
|
<Isolated>False</Isolated>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</COMReference>
|
||||||
|
<COMReference Include="Microsoft.Office.Interop.Excel">
|
||||||
|
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
|
||||||
|
<VersionMajor>1</VersionMajor>
|
||||||
|
<VersionMinor>9</VersionMinor>
|
||||||
|
<Lcid>0</Lcid>
|
||||||
|
<WrapperTool>primary</WrapperTool>
|
||||||
|
<Isolated>False</Isolated>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</COMReference>
|
||||||
<COMReference Include="SldWorks">
|
<COMReference Include="SldWorks">
|
||||||
<Guid>{83A33D31-27C5-11CE-BFD4-00400513BB57}</Guid>
|
<Guid>{83A33D31-27C5-11CE-BFD4-00400513BB57}</Guid>
|
||||||
<VersionMajor>28</VersionMajor>
|
<VersionMajor>28</VersionMajor>
|
||||||
|
|
@ -132,6 +150,15 @@
|
||||||
<Isolated>False</Isolated>
|
<Isolated>False</Isolated>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</COMReference>
|
</COMReference>
|
||||||
|
<COMReference Include="VBIDE">
|
||||||
|
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
|
||||||
|
<VersionMajor>5</VersionMajor>
|
||||||
|
<VersionMinor>3</VersionMinor>
|
||||||
|
<Lcid>0</Lcid>
|
||||||
|
<WrapperTool>primary</WrapperTool>
|
||||||
|
<Isolated>False</Isolated>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</COMReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Resources\" />
|
<Folder Include="Resources\" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue