"TypeError: Cannot read properties of undefined (reading 'getCellValueAsString')
at updatePreviousCompensation on line 13 at main on line 33"
at updatePreviousCompensation on line 13 at main on line 33"
Kudos for your willingness to go the code route! Unfortunately AI isn't great when it comes to coding. Actually, let me rephrase that: AI can be awesome when it comes to coding - so long as you understand its limitations. One of them being that it is often wrong. Another being that it is very confident in its wrong answers.
Nonetheless, it will improve over time and become an invaluable tool for developers: beginners and expert alike.
Now, to your particular use case, there are a few issues with the code you are trying. And rather than trying to fix the AI code, if you explain in plain English EXACTLY what you are trying to achieve, including table names and fields names, and ideally some screenshots of your tables (WITHOUT any salary information of course) - then I'm happy to write the script for you - and explain what each line does. That way you'll be able to make any tweaks to it over time.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.