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

Small bug fixes on Import Dataset dialog #6242

Merged
merged 8 commits into from
Mar 15, 2021
Merged
19 changes: 15 additions & 4 deletions instat/dlgImportDataset.vb
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ Public Class dlgImportDataset
SetControlsFromFile("")
Else
dctSelectedExcelSheets.Clear()
clbSheets.Items.Clear()
SetControlsFromFile(dlgOpen.FileName)
End If
Else
Expand Down Expand Up @@ -636,10 +637,20 @@ Public Class dlgImportDataset
strFileType = ""
End If
If strFileType <> "" AndAlso strFileType <> "RDS" Then
'ucrSaveFile.Show()
'ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True)
'don't ovewrite the name for excel sheets if there is a selected sheet name
If (strFileType <> "XLSX" OrElse strFileType <> "XLS") AndAlso clbSheets.CheckedItems.Count = 0 Then
If (strFileType = "XLSX" OrElse strFileType = "XLS") Then
ucrSaveFile.SetAssignToBooleans(bTempDataFrameList:=True)
Select Case clbSheets.CheckedItems.Count
Case Is > 1
ucrSaveFile.Hide()
Case 1
ucrSaveFile.Show()
ucrSaveFile.SetName(dctSelectedExcelSheets.Values.First(), bSilent:=True)
Case 0
ucrSaveFile.Show()
ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True)
End Select
Else
ucrSaveFile.SetAssignToBooleans(bTempDataFrameList:=False)
ucrSaveFile.Show()
ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True)
End If
Expand Down