VBA 매크로의 호환 여부 확인
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Visual Basic for Applications (VBA) 매크로가 포함된 Excel 파일은 매크로에 사용된 모든 API에 Apps Script의 직접적인 상응 항목이 있는 경우 호환되는 것으로 간주됩니다. 매크로가 완전히 호환되지 않는 경우 해결 방법을 적용하거나 코드를 조정하여 Apps Script에서 작동하도록 할 수 있습니다.
매크로 변환기의 호환성 보고서를 사용하여 파일을 있는 그대로 자동 변환할 수 있는지 또는 코드를 조정해야 하는지 확인합니다.
호환성 보고서를 생성하면 각 파일과 API에 다음 상태 중 하나가 적용됩니다.
상태 |
정의 |
정확하게 지원됨 |
이러한 파일에는 Apps Script에 직접 상응하는 API가 모두 포함되어 있습니다. |
해결 방법으로 지원됨 |
이러한 파일에는 해결 방법으로 지원할 수 있는 API가 하나 이상 포함되어 있습니다. |
추가 조사 필요 |
이러한 파일에는 검토하여 진행 방법을 결정해야 하는 API가 하나 이상 포함되어 있습니다. 예를 들어 상응하는 API가 없거나 매크로 변환기에서 사용 중인 API를 확인하지 못했을 수 있습니다. |
호환성 보고서 생성
- 컴퓨터에서 Google Drive를 엽니다.
- 오른쪽 패널에서 매크로 변환기 부가기능
을 클릭합니다.
측면 패널이 표시되지 않으면 오른쪽 하단에서 측면 패널 표시 chevron_left를 클릭합니다.
- 파일 및 폴더 추가를 클릭합니다. 매크로 변환기는 Excel 파일만 인식합니다.
- 분석할 파일 또는 폴더를 선택하고 선택을 클릭합니다. 한 번에 2,000개 미만의 파일을 선택합니다.
- 호환성 보고서가 저장되는 위치를 변경하려면 대상 폴더 변경 edit을 클릭하고 원하는 폴더를 선택합니다. 그렇지 않으면 내 드라이브 폴더에 저장됩니다.
- 보고서 생성을 클릭합니다.
- 분석이 완료되면 보고서 보기를 클릭합니다.
호환성 보고서 검토
호환성 보고서의 세부정보를 사용하여 파일 변환을 어떻게 진행할지 결정합니다. 보고서에는 다음 섹션이 포함됩니다.
조사할 API 및 해결 방법이 있는 API 시트를 사용하여 API별로 보고서를 검토할 수도 있습니다.
진행 방법 결정
각 상태에 대한 권장사항은 다음과 같습니다.
상태 |
권장사항 |
정확하게 지원됨 |
VBA API의 동일한 로직을 Apps Script에서 복제할 수 있습니다.
변환을 진행합니다. |
해결 방법으로 지원됨 |
하나 이상의 VBA API를 이에 상응하는 Apps Script API로 대체하는 코드를 작성해야 합니다. 일반적으로 변환을 진행할 수 있습니다.
파일을 변환하기 전이나 후에 해결 방법이 지원됨으로 표시된 VBA API를 수동으로 바꿀 수 있습니다. 미리 변경사항을 적용하는 것이 좋습니다.
|
추가 조사 필요 |
하나 이상의 API를 변환할 수 없습니다. 코드에서 해당 API의 중요도에 따라 파일을 변환하지 못할 수도 있습니다.
원래 VBA 코드를 이해하는 사람이 최종 평가를 해야 합니다.
파일을 변환하기로 결정한 경우 하나 이상의 VBA API를 Apps Script로 대체하는 코드를 작성해야 합니다. 파일을 변환하기 전이나 후에 조사 필요로 표시된 VBA API를 수동으로 바꿀 수 있습니다. 미리 변경사항을 적용하는 것이 좋습니다.
|
호환성 보고서를 평가한 후 VBA 매크로를 Apps Script로 변환하기를 참고하세요.
관련 도움말
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eVBA macros with direct Apps Script equivalents are considered compatible and can be automatically converted using the Macro Converter add-on.\u003c/p\u003e\n"],["\u003cp\u003eThe Macro Converter's compatibility report identifies files as "Supported exactly", "Supported with workarounds", or "Needs more investigation", guiding your conversion strategy.\u003c/p\u003e\n"],["\u003cp\u003eFor files needing workarounds or further investigation, manual code adjustments may be necessary before or after conversion using equivalent Apps Script APIs.\u003c/p\u003e\n"],["\u003cp\u003eThe compatibility report provides detailed analysis at the file and API level to help assess conversion feasibility and required actions.\u003c/p\u003e\n"],["\u003cp\u003eAfter reviewing the report, proceed with file conversion, addressing potential issues as outlined in the documentation.\u003c/p\u003e\n"]]],[],null,["# Determine if VBA macros are compatible\n\nAn Excel file with Visual Basic for Applications (VBA) macros is considered\ncompatible if all APIs used in the macros have a direct equivalent in Apps\nScript. If your macros aren't fully compatible, you might be able to apply\nworkarounds or adjust the code to make them work with Apps Script.\n\nUse the Macro Converter's compatibility report to determine if you can\nautomatically convert your files as-is or if you need to make adjustments to\nyour code.\n\nWhen you generate a compatibility report, one of the following statuses is\napplied to each of your files and APIs:\n\n| Status | Definition |\n|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Supported exactly** | These files contain APIs that all have direct equivalents in Apps Script. |\n| **Supported with workarounds** | These files contain at least one API that can be supported with a workaround. |\n| **Needs more investigation** | These files contain at least one API that you need to review to determine how to proceed. For instance, there might not be an equivalent API, or the Macro Converter might not have determined the API in use. |\n\nGenerate a compatibility report\n-------------------------------\n\n1. On your computer, open [Google Drive](https://drive.google.com/drive/my-drive).\n2. On the right side panel, click the Macro Converter add-on . If you don't see the side panel, at the bottom right, click Show side panel chevron_left.\n3. Click **Add files and folders**. The Macro Converter only recognizes Excel files.\n4. Choose the files or folders you want to analyze and click **Select**. Select fewer than 2,000 files at a time.\n5. To change where your compatibility report is saved, click Change destination folder edit, and select the folder you want. Otherwise, it's saved in your MyDrive folder.\n6. Click **Generate report**.\n7. When the analysis completes, click **View report**.\n\nReview the compatibility report\n-------------------------------\n\nUse the details in the compatibility report to help you decide how to proceed\nwith your file conversion. Your report includes the following sections:\n\n- **Summary**: This sheet gives an aggregated analysis of the compatibility of all submitted files and their APIs.\n- **Files - compatibility**: This sheet lists every file submitted to the Macro Converter with the compatibility status and details of each file.\n- **Files - detailed analysis**: This sheet gives more information about the\n APIs within a file and what actions you can take to successfully convert each\n API. First, from the top dropdown menu, select a file. Then, from the bottom\n dropdown menu, select a status.\n\n | **Note:** If multiple files have the same name, next to the file names, use the unique identifiers to tell the difference between them. You can open the files in Drive and look for the unique identifiers in the URLs: `https://drive.google.com/file/d/\u003cfile_identifier\u003e/view`.\n\nYou can also review the report on an API-by-API basis using the sheets called\n**APIs to investigate** and **APIs with workarounds**.\n\nDetermine how to proceed\n------------------------\n\nHere's what we recommend for each status:\n\n| Status | Recommendation |\n|--------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Supported exactly** | The same logic from your VBA APIs will be replicable in Apps Script. [Proceed with the conversion](/apps-script/guides/macro-converter/convert-files). |\n| **Supported with workarounds** | You need to write code to replace at least one VBA API with the equivalent Apps Script API. In general, you can proceed with the conversion. You can manually replace the VBA APIs marked as *Supported with workarounds* either before or after you convert the file. We recommend that you [make your changes beforehand](/apps-script/guides/macro-converter/convert-files#modify_incompatible_vba_apis). |\n| **Needs more investigation** | At least one API can't be converted. Depending on the importance of that API in your code, you might not be able to convert the file. Someone who understands the original VBA code should do the final evaluation. \u003cbr /\u003e If you decide to convert your file, you need to write code to replace at least one VBA API with Apps Script. You can manually replace the VBA APIs marked as *Needs investigation* either before or after you convert the file. We recommend that you [make your changes beforehand](/apps-script/guides/macro-converter/convert-files#modify_incompatible_vba_apis). |\n\nAfter you assess your compatibility report, see [Convert VBA macros to Apps\nScript](/apps-script/guides/macro-converter/convert-files).\n\nRelated articles\n----------------\n\n- [Macro Converter add-on overview](/apps-script/guides/macro-converter/overview)\n- [Convert VBA macros to Apps Script](/apps-script/guides/macro-converter/convert-files)\n- [Fix errors in your converted code](/apps-script/guides/macro-converter/fix-conversion-errors)\n- [Address common issues](/apps-script/guides/macro-converter/address-conversion-issues)\n- [Watch Macro Converter tutorials](/apps-script/guides/macro-converter/tutorials)\n- [List of compatible VBA APIs](/apps-script/guides/macro-converter/compatible-vba-apis)"]]