Chuyển code VBA thành Google Script
Sử dụng tiện ích bổ sung Macro Converter để chuyển đổi các tập tin Microsoft Excel dùng macro sang Google SheetTháng 12 17, 2020 Show
Tính năng mới: Google đã ra mắt Macro Converter cho Google Sheet. Tiện ích bổ sung Google Workspace này sẽ giúp chuyển đổi mã Visual Basic for Applications (VBA) được sử dụng trong macro Microsoft Excel thành mã Apps Script hoạt động trong Google Sheet. Nhiều tổ chức sử dụng macro trong Sheet và Excel để tự động hóa các quy trình. Khách hàng của Google Workspace Enterprise Plus có thể sử dụng tiện ích bổ sung Macro Conversion để xác định tính tương thích của các tập tin Excel và giúp chuyển đổi nếu có thể. Điều này có thể giúp các nhóm tạo lại macro Excel trong Sheet, giúp tiết kiệm thời gian thông qua tự động hóa đồng thời giảm bớt công việc cần thiết để chuyển đổi tập tin. Làm thế nào để bắt đầu:
Thời gian triển khai:
Phiên bản phát hành:
Nguồn: LVtech
Before you beginYou might want to update incompatible APIs in your VBA code before you convert your files. For files that have the status Supported exactly, you can proceed to Step 1: Convert your files. Modify incompatible VBA APIsFor files that have the status Supported with workaround or Needs investigation, you can apply your workarounds and fixes after the conversion in Apps Script, but we recommend that you modify the VBA code that you’re familiar with first, before you convert your files. For each API marked as Supported with workaround or Needs investigation in the compatibility report, we recommend the following:
Step 1: Convert your files
Step 2: Test your converted filesRun your Apps Script codeAfter you convert your files, test the Apps Script functions. Test the converted files with the data you normally use with your Excel files. If possible, compare the output of your converted Sheets files with the output of your original Excel files. Test your triggersIf your files contain triggers like
Review ReadMe filesIf a ReadMe file was generated with your converted file, review the conversion issues listed within the ReadMe file.
Step 3: Fix errorsIf you run into errors while testing your files, see Fix errors in your converted code. If the code runs without errors, but the result isn’t what you expected, open the file’s ReadMe file. Review each section to help determine what’s causing the issue and apply the recommended fix. After you fix errors, test the file again to make sure everything works as intended. Related articles
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated 2021-01-29 UTC. [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }] |