VBA ম্যাক্রোকে Apps স্ক্রিপ্টে রূপান্তর করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি শুরু করার আগে
আপনি আপনার ফাইলগুলি রূপান্তর করার আগে আপনার VBA কোডে বেমানান API আপডেট করতে চাইতে পারেন৷ স্ট্যাটাস সমর্থিত ফাইলগুলির জন্য, আপনি ধাপ 1 এ যেতে পারেন: আপনার ফাইলগুলিকে রূপান্তর করুন ৷
বেমানান VBA APIs সংশোধন করুন
যে ফাইলগুলির স্ট্যাটাস আছে ওয়ার্কঅ্যারাউন্ড সহ সমর্থিত বা তদন্তের প্রয়োজন আছে , আপনি Apps স্ক্রিপ্টে রূপান্তর করার পরে আপনার সমাধান এবং সংশোধনগুলি প্রয়োগ করতে পারেন, তবে আমরা সুপারিশ করি যে আপনি আপনার ফাইলগুলি রূপান্তর করার আগে প্রথমে আপনার পরিচিত VBA কোডটি সংশোধন করুন৷
সামঞ্জস্যপূর্ণ প্রতিবেদনে সমর্থিত কর্মক্ষেত্র বা তদন্তের প্রয়োজন হিসাবে চিহ্নিত প্রতিটি API-এর জন্য, আমরা নিম্নলিখিতগুলি সুপারিশ করি:
- যদি API দ্বারা সম্পাদিত ফাংশনটি আপনার VBA ম্যাক্রো সঠিকভাবে কাজ করার জন্য গুরুত্বপূর্ণ না হয়, তাহলে এটিকে আপনার VBA কোড থেকে সরিয়ে দিন। যদি তা হয়, সমর্থিত VBA API-এর সাথে অনুরূপ আচরণ বাস্তবায়ন করতে আপনার কোড পরিবর্তন করুন।
- কর্মক্ষেত্রের সাথে সমর্থিত স্থিতি সহ APIগুলির জন্য, যদি আপনি সমর্থিত VBA APIগুলিতে স্যুইচ করতে না পারেন, আপনার VBA APIগুলিকে যেমন আছে তেমনই রেখে দিন। আপনি Apps স্ক্রিপ্টে রূপান্তর করার পরে, রূপান্তরিত Apps স্ক্রিপ্ট কোডের মন্তব্যে এই API-এর জন্য একটি পরিচিত সমাধান সুপারিশ করা হয়।
- যদি সমস্যাটি একটি অপ্রয়োজনীয় ভাষা নির্মাণ থেকে আসছে, তাহলে সেই গঠনগুলি ব্যবহার করা এড়াতে আপনার কোডটি পুনরায় লিখুন।
স্থিতি সহ APIগুলির জন্য তদন্তের প্রয়োজন , আপনার কোডে নিম্নলিখিত APIগুলির মধ্যে কোনোটি রয়েছে কিনা তা পরীক্ষা করুন:
-
Adodb.connection
-
CreateObject
: এই API প্রায়শই ডাটাবেস এবং এন্টারপ্রাইজ রিসোর্স প্ল্যানিং সফ্টওয়্যারের সাথে সংযোগ করতে ব্যবহৃত হয়। -
Shell.execute
-
OleObject
যদি হ্যাঁ, আমরা সুপারিশ করি যে আপনি এই APIগুলির অন্তর্গত ফাইলগুলিকে রূপান্তর করবেন না এবং অন্যান্য বিকল্পগুলি তদন্ত করবেন না৷ এই APIগুলি একটি ম্যাক্রোর জন্য গুরুত্বপূর্ণ ক্রিয়াকলাপগুলি সম্পাদন করে, যেমন একটি ডাটাবেসের সাথে সংযোগ করা বা একটি স্থানীয় সংস্থান অ্যাক্সেস করা, এবং অ্যাপস স্ক্রিপ্ট সাধারণত একটি ভাল সমাধান নয়৷
ধাপ 1: আপনার ফাইল রূপান্তর
- আপনার কম্পিউটারে, Google ড্রাইভ খুলুন।
- ডান পাশের প্যানেলে, ম্যাক্রো কনভার্টার অ্যাড-অনে ক্লিক করুন
. আপনি যদি পাশের প্যানেলটি দেখতে না পান, নীচে ডানদিকে, সাইড প্যানেল দেখান chevron_left ক্লিক করুন। - ফাইল এবং ফোল্ডার যোগ করুন ক্লিক করুন। ম্যাক্রো কনভার্টার শুধুমাত্র এক্সেল ফাইল সনাক্ত করে।
- আপনি যে ফাইল বা ফোল্ডারগুলিকে রূপান্তর করতে চান তা চয়ন করুন এবং নির্বাচন করুন ক্লিক করুন। একবারে 2,000 টিরও কম ফাইল নির্বাচন করুন৷
- আপনার রূপান্তরিত ফাইলগুলি কোথায় সংরক্ষিত হবে তা পরিবর্তন করতে, গন্তব্য ফোল্ডার edit পরিবর্তন করুন ক্লিক করুন এবং আপনি যে ফোল্ডারটি চান তা নির্বাচন করুন। অন্যথায়, ফাইলগুলি আপনার MyDrive ফোল্ডারে সংরক্ষিত হয়।
- Convert এ ক্লিক করুন।
- রূপান্তর সম্পূর্ণ হলে, ফলাফল দেখুন ক্লিক করুন।
ধাপ 2: আপনার রূপান্তরিত ফাইল পরীক্ষা করুন
আপনার Apps স্ক্রিপ্ট কোড চালান
আপনি আপনার ফাইল রূপান্তর করার পরে, Apps স্ক্রিপ্ট ফাংশন পরীক্ষা করুন. আপনি সাধারণত আপনার এক্সেল ফাইলগুলির সাথে যে ডেটা ব্যবহার করেন তা দিয়ে রূপান্তরিত ফাইলগুলি পরীক্ষা করুন। যদি সম্ভব হয়, আপনার রূপান্তরিত পত্রক ফাইলগুলির আউটপুট আপনার আসল এক্সেল ফাইলগুলির আউটপুটের সাথে তুলনা করুন৷
আপনার ট্রিগার পরীক্ষা করুন
যদি আপনার ফাইলগুলিতে onOpen()
, onEdit()
, বা onClick()
এর মতো ট্রিগার থাকে তবে আপনার ট্রিগারগুলিও পরীক্ষা করুন৷ কিছু VBA ট্রিগার স্বয়ংক্রিয়ভাবে রূপান্তরিত হবে না এবং অ্যাপস স্ক্রিপ্টে সমাধান করতে হবে। সাধারণ সমস্যার ঠিকানা দেখুন।
ReadMe ফাইল পর্যালোচনা করুন
আপনার রূপান্তরিত ফাইলের সাথে একটি ReadMe ফাইল তৈরি হলে, ReadMe ফাইলের মধ্যে তালিকাভুক্ত রূপান্তর সমস্যাগুলি পর্যালোচনা করুন৷
- আপনি যদি পরীক্ষা করেননি এমন ক্ষেত্রে সমস্যাগুলি সমস্যাযুক্ত হতে পারে, আপনার কোডে প্রস্তাবিত পরিবর্তনগুলি প্রয়োগ করুন৷
- আপনি যদি সমস্ত সম্ভাব্য পরিস্থিতি পরীক্ষা করে থাকেন এবং সবকিছুই উদ্দেশ্য অনুযায়ী কাজ করে, তাহলে সম্ভবত আপনাকে পরিবর্তন করতে হবে না।
ধাপ 3: ত্রুটি ঠিক করুন
আপনার ফাইলগুলি পরীক্ষা করার সময় আপনি যদি ত্রুটির সম্মুখীন হন, আপনার রূপান্তরিত কোডে ত্রুটিগুলি সংশোধন করুন দেখুন৷
যদি কোডটি ত্রুটি ছাড়াই চলে তবে ফলাফলটি আপনি যা আশা করেছিলেন তা না হলে, ফাইলটির ReadMe ফাইলটি খুলুন। সমস্যাটির কারণ কী তা নির্ধারণ করতে এবং প্রস্তাবিত সমাধান প্রয়োগ করতে সাহায্য করার জন্য প্রতিটি বিভাগ পর্যালোচনা করুন।
আপনি ত্রুটিগুলি ঠিক করার পরে, সবকিছুই উদ্দেশ্য অনুযায়ী কাজ করছে তা নিশ্চিত করতে ফাইলটি আবার পরীক্ষা করুন।
সম্পর্কিত নিবন্ধ
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Macro Converter add-on helps you convert your VBA macros to Apps Script, allowing them to run in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003eBefore converting, review the compatibility report and modify or remove incompatible VBA APIs for better conversion results.\u003c/p\u003e\n"],["\u003cp\u003eThe conversion process involves adding files to the add-on, initiating the conversion, and then testing the converted Apps Script functions and triggers in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003eIf errors occur or the results are unexpected, consult the generated ReadMe files and the troubleshooting documentation to fix issues and ensure proper functionality.\u003c/p\u003e\n"],["\u003cp\u003eAfter successful conversion and testing, your macros will be operational within Google Sheets, leveraging the capabilities of Apps Script.\u003c/p\u003e\n"]]],[],null,["# Convert VBA macros to Apps Script\n\nBefore you begin\n----------------\n\nYou might want to update incompatible APIs in your VBA code before you convert\nyour files. For files that have the status *Supported exactly* , you can proceed\nto [Step 1: Convert your files](/apps-script/guides/macro-converter/convert-files#step_1_convert_your_files).\n\n### Modify incompatible VBA APIs\n\nFor files that have the status *Supported with workaround* or *Needs\ninvestigation*, you can apply your workarounds and fixes after the conversion\nin Apps Script, but we recommend that you modify the VBA code that you're\nfamiliar with first, before you convert your files.\n\nFor each API marked as *Supported with workaround* or *Needs investigation* in\nthe compatibility report, we recommend the following:\n\n- If the function performed by the API isn't critical to your VBA macro working properly, remove it from your VBA code. If it is, change your code to implement a similar behavior with [supported VBA APIs](/apps-script/guides/macro-converter/compatible-vba-apis).\n- For APIs with the status *Supported with workaround*, if you can't switch to supported VBA APIs, leave your VBA APIs as is. After you convert to Apps Script, a known workaround for this API is recommended in the comments of the converted Apps Script code.\n- If the issue is coming from an [unimplemented language construct](/apps-script/guides/macro-converter/fix-conversion-errors#unimplemented_language_constructs), rewrite your code to avoid using those constructs.\n- For APIs with the status *Needs investigation*, check if your code contains\n any of the following APIs:\n\n - `Adodb.connection`\n - `CreateObject`: This API is often used to connect to database and enterprise resource planning software.\n - `Shell.execute`\n - `OleObject`\n\n If yes, we recommend that you don't convert the files these APIs belong to\n and investigate other options. These APIs tend to perform critical operations\n for a macro, like connecting to a database or accessing a local resource, and\n Apps Script is generally not a good solution.\n\nStep 1: Convert your files\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 convert and click **Select**. Select fewer than 2,000 files at a time.\n5. To change where your converted files are saved, click Change destination folder edit, and select the folder you want. Otherwise, the files are saved in your MyDrive folder.\n6. Click **Convert**.\n7. When the conversion completes, click **View results**.\n\nStep 2: Test your converted files\n---------------------------------\n\n### Run your Apps Script code\n\nAfter you convert your files, test the Apps Script functions. Test the converted\nfiles with the data you normally use with your Excel files. If possible, compare\nthe output of your converted Sheets files with the output of your original Excel\nfiles.\n\n### Test your triggers\n\nIf your files contain triggers like `onOpen()`, `onEdit()`, or `onClick()`, test\nyour triggers, too. Some VBA triggers won't convert automatically and need to be\naddressed in Apps Script. See [Address common issues](/apps-script/guides/macro-converter/address-conversion-issues).\n\n### Review ReadMe files\n\nIf a ReadMe file was generated with your converted file, review the conversion\nissues listed within the ReadMe file.\n\n- If the issues might be problematic for cases you haven't tested, apply the recommended changes to your code.\n- If you've tested all possible scenarios and everything works as intended, you probably don't need to make changes.\n\nStep 3: Fix errors\n------------------\n\nIf you run into errors while testing your files, see [Fix errors in your\nconverted code](/apps-script/guides/macro-converter/fix-conversion-errors).\n\nIf the code runs without errors, but the result isn't what you expected, open\nthe file's ReadMe file. Review each section to help determine what's causing the\nissue and apply the recommended fix.\n\nAfter you fix errors, test the file again to make sure everything works as\nintended.\n\nRelated articles\n----------------\n\n- [Macro Converter add-on overview](/apps-script/guides/macro-converter/overview)\n- [Determine if VBA macros are compatible](/apps-script/guides/macro-converter/compatibility-report)\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)"]]