Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fixes for Excel range settings #9452

Merged
merged 3 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions instat/dlgImportDataset.vb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Public Class dlgImportDataset
bReset = False
TestOkEnabled()
autoTranslate(Me)
InitializeSheetSelection()
End Sub

Private Sub InitialiseDialog()
Expand Down Expand Up @@ -1048,6 +1049,21 @@ Public Class dlgImportDataset
TestOkEnabled()
End Sub

Private Sub InitializeSheetSelection()
' Ensure at least one sheet exists
If clbSheets.Items.Count > 0 Then
' Temporarily remove event handling to prevent infinite recursion
RemoveHandler clbSheets.ItemCheck, AddressOf clbSheets_ItemCheck
clbSheets.SetItemChecked(0, True) ' Check the first sheet
dctSelectedExcelSheets(1) = clbSheets.Items.Item(0).ToString()
AddHandler clbSheets.ItemCheck, AddressOf clbSheets_ItemCheck
lblImportingSheets.Hide()
End If
TryGridPreview()
TestOkEnabled()
End Sub


Private Sub ucrSaveFile_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveFile.ControlContentsChanged
TestOkEnabled()
End Sub
Expand Down Expand Up @@ -1102,6 +1118,11 @@ Public Class dlgImportDataset
Else
clsImportExcel.RemoveParameterByName("range")
End If
If ucrChkRange.Checked Then
clsImportExcelMulti.AddParameter("range", clsROperatorParameter:=clsRangeOperator)
Else
clsImportExcelMulti.RemoveParameterByName("range")
End If
TryGridPreview()
TestOkEnabled()
End Sub
Expand Down
Loading