This is Generally Resolved with the way you Described above, Because you said that you created .twbx, So If you replace it with new file, it should work.
Difficult to answer this without actually seeing the twbx, but I saw a twbx earlier today that, for some reason, did not include the data. A twbx is really just a zip file that includes both the data (such as Excel, if it is a live connection or tde/hyper extract) plus the twb. So, you can change the extension of the file to zip then open it like a zip file. I'd be curious to see what was inside the zip file if you did that. Do you just see the twb or do you see the twb, plus some folders, one of which includes the Excel data source?
So i have made a small change to code, now i have created an extract connection instead of live one. The data has been saved in .tde format. Saved as twbx file and surety checked again by unpacking the twbx file but it still looking for the xlsx file. Not sure what i am doing wrong?