- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Excel. NamedRangeValue 를 사용하여 워크시트 영역까지는 지정을 했습니다.
워크시트 영역의 값을 순차적으로 읽어 가면서 기존품명을 변경품명으로 변경하려고 합니다.
GoExcel.Open("TEST.xlsx", "sheet1")
RangeArray = GoExcel.NamedRangeValue("기존품명")
RangeArray = GoExcel.NamedRangeValue("변경품명")
Dim oList As ArrayList
oList = NewArrayList
Dim oRowsCout
Dim NewTN_1 As String = GoExcel.CellValue("TEST.xlsx", "sheet1", "F1")
' Get current location of where you want the search area to be.
Dim ExportPath As String = "C:\"
' Define folder browse dialog
Dim Dialog = New FolderBrowserDialog()
' Set options for folder browser dialog
Dialog.SelectedPath = ExportPath
Dialog.ShowNewFolderButton = True
Dialog.Description = "Choose Folder for Export..."
' Show dialog box
If DialogResult.OK = Dialog.ShowDialog() Then
' User clicked 'ok' on dialog box - capture the export path
ExportPath = Dialog.SelectedPath & "\"
Else
' User clicked 'cancel' on dialog box - exit
Return
End If
Dim Path As String = ExportPath
MessageBox.Show(Path, "Directory path")
InvDoc = ThisDoc.Document
Dim refDocs As DocumentsEnumerator = InvDoc.AllReferencedDocuments
Dim refDoc As Document
For Each refDoc In refDocs
'MessageBox.Show(refDoc.DisplayName)
If refDoc.DisplayName.EndsWith(OldPN_1 & ".ipt")= True Then
NewFileName = NewPN_1 & ".ipt"
refDoc.SaveAs(Path & NewFileName, False)
Return
End If
Next
ThisDoc.Document.SaveAs(Path & NewTN_1 & ".iam", False)
iLogicVb.UpdateWhenDone = True
Samle 모델링과 로직 파일을 업로드 하였으니 참고 바랍니다.
도움주실수 있을까요??
Solved! Go to Solution.