메인 컨텐츠로 가기

닫힌 통합 문서에서 현재 통합 문서로 데이터를 가져 오거나 복사하는 방법은 무엇입니까?

열려있는 워크 시트의 데이터를 복사하여 열려있는 다른 통합 문서에 붙여 넣기는 쉽지만 닫힌 통합 문서의 데이터를 열려있는 통합 문서로 가져 오려고 한 적이 있습니까? 이 기사에서는 닫힌 통합 문서에서 데이터를 가져 오는 방법에 대해 설명합니다.

VBA 코드를 사용하여 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기

Excel 용 Kutools를 사용하여 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기


VBA 코드를 사용하여 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기

다음 VBA 코드는 열려있는 활성 통합 문서로 열지 않고 통합 문서에서 데이터를 복사하는 데 도움이 될 수 있습니다. 다음 단계를 수행하십시오.

1. 누르고 ALT + F11 키가 열립니다. 응용 프로그램 용 Microsoft Visual Basic 창.

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 다음 코드를 모듈 창.

VBA 코드 : 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기

Sub ImportDatafromcloseworkbook()
'Updateby Extendoffice
Dim xWb As Workbook
Dim xAddWb As Workbook
Dim xRng1 As Range
Dim xRng2 As Range
Set xWb = Application.ActiveWorkbook
xTitleId = "KutoolsforExcel"
With Application.FileDialog(msoFileDialogOpen)
    .Filters.Clear
    .Filters.Add "Excel 2007-13", "*.xlsx; *.xlsm; *.xlsa"
    .AllowMultiSelect = False
    .Show
    If .SelectedItems.Count > 0 Then
        Application.Workbooks.Open .SelectedItems(1)
        Set xAddWb = Application.ActiveWorkbook
        Set xRng1 = Application.InputBox(prompt:="Select source range", Title:=xTitleId, Default:="A1", Type:=8)
        xWb.Activate
        Set xRng2 = Application.InputBox(prompt:="Select destination cell", Title:=xTitleId, Default:="A1", Type:=8)
        xRng1.Copy xRng2
        xRng2.CurrentRegion.EntireColumn.AutoFit
        xAddWb.Close False
    End If
End With
End Sub

3. 그런 다음 F5 이 코드를 실행하는 키와 파일 열기 창에서 데이터를 가져올 통합 문서를 선택하고 스크린 샷을 참조하십시오.

닫힌 통합 문서에서 문서 가져 오기 데이터 1

4. 그런 다음 엽니다 버튼, Kutoolsfor엑셀 다른 통합 문서로 가져올 데이터 범위를 선택하라는 대화 상자가 나타납니다. 스크린 샷을 참조하십시오.

닫힌 통합 문서에서 문서 가져 오기 데이터 2

5. 그런 다음 OK 버튼을 클릭하고 튀어 나온 대화 상자에서 데이터를 넣을 셀을 선택합니다. 스크린 샷 참조 :

닫힌 통합 문서에서 문서 가져 오기 데이터 3

6. 클릭 OK, 닫힌 통합 문서의 데이터를 현재 통합 문서로 가져 왔습니다.


Excel 용 Kutools를 사용하여 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기

VBA 코드는 Excel 초보자에게는 다소 어려울 수 있으므로 여기에서 편리한 도구를 권장합니다.Excel 용 Kutools그와 커서에 파일 삽입 기능을 사용하면 닫힌 통합 문서에서 워크 시트의 전체 내용을 빠르고 쉽게 삽입 할 수 있습니다.

Excel 용 Kutools : 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다.

설치 후 Excel 용 Kutools, 다음과 같이하십시오.

1. 쿠툴즈 플러스 > 수입 수출 > 커서에 파일 삽입, 스크린 샷 참조 :

닫힌 통합 문서에서 문서 가져 오기 데이터 5

2. 에서 커서에 파일 삽입 대화 상자에서 다음 작업을 수행하십시오.

(1.) 클릭 닫힌 통합 문서에서 문서 가져 오기 데이터 6가져온 데이터를 넣을 셀을 선택하는 버튼;

(2.) 클릭 닫힌 통합 문서에서 문서 가져 오기 데이터 7버튼을 눌러 데이터를 가져올 통합 문서를 선택합니다.

참고 : 값만 (공식 없음):이 옵션을 선택하면 값만 가져오고 수식을 가져 오지 않습니다.

서식 전송 안함:이 옵션을 선택하면 서식없이 데이터를 워크 시트로 가져옵니다.

Excel 용 Kutools를 지금 다운로드하고 무료로 평가하십시오!

3. 그런 다음 OK, 통합 문서에 워크 시트가 두 개 이상있는 경우 워크 시트 선택 대화 상자가 나타나면 데이터를 가져올 워크 시트를 지정하십시오. 스크린 샷을 참조하십시오.

닫힌 통합 문서에서 문서 가져 오기 데이터 8

4. 그런 다음 OK 버튼을 클릭하면 선택한 워크 시트의 데이터를 현재 통합 문서로 가져 왔습니다.

이 커서에 파일 삽입 기능에 대한 자세한 내용을 보려면 클릭하십시오.

Excel 용 Kutools를 지금 다운로드하고 무료로 평가하십시오!


데모 : Excel 용 Kutools를 사용하여 닫힌 통합 문서에서 현재 통합 문서로 데이터 가져 오기

Excel 용 Kutools: 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다. 지금 다운로드 및 무료 평가판!

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Missed important thing. Only values need to be imported (not formulas).
This comment was minimized by the moderator on the site
Hi,
I need to import range of data (with keeping formating) from 5 different workbooks (each contain 3 sheets, only one sheet need to be imported) to 5 specified sheets in master workbook (the destination sheet need to have same name all the time, which is different than source sheet name). Every week the source file/sheet name is different. Could you help with this, please?
This comment was minimized by the moderator on the site
Works great, however in the file I open it will only allow me to open from the tab that is was last on. Is there a way to allow me to select the worksheet I want first before I select the cell range?
This comment was minimized by the moderator on the site
Hello, Patrick,When applying the above code, if the prompt box is popped out, you can just click any sheet tab you need, and then select the cell range.Please try it again, thank you!
This comment was minimized by the moderator on the site
it works grate thank you. i am having issue with data copied its formula not the value. how can i copy only value.
This comment was minimized by the moderator on the site
Buen dia! he utilizado su macro y realmente me fue muy util, pero quisiera saber, ¿como puedo agregar una instruccion a la macro para que se peguen solo los valores y no las formulas al libro abierto y también quisiera que al pegar la informacion, agregara una fila adicional para poder seguir pegando datos de otros archivos cerrados...

Esto es porque yo recibo informacion de los candidatos y lo debo de concentrar en un formato maestro.
This comment was minimized by the moderator on the site
Funcionou a primeira vez que tentei.. Agora por algum motivo não esta funcionando mais..Parece que esta copiando os valores apenas. Quando faço alteração de algum dado na planilha, nao esta mudando na outra.. o que devo fazer?
This comment was minimized by the moderator on the site
Thanks for the awesome trick here. I managed to get the coding work with my current project. My question is how can I set ''destination cell'' default to range ''A5'' without popping out InputBox
This comment was minimized by the moderator on the site
Thanks for the above. I'm trying to use VBA but when I reach to step #3: 3. Then press F5 key to run this code, and in the File Open window, select the workbook that you want to import its data I can't "see" the file I need to import the data from! the folder doesn't show that file! What can I do?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations