Question: How to make Maple use a relative path when importing data from Excel?

When our students import data from an Excel file into Maple using Tools > Import Data, everything works as expected.

After doing some experiments, however, I realized that the data from the Excel file is not embedded in the Maple worksheet. That is probably a sensible design choice for large datasets. However, I also discovered that Maple stores an absolute path to the Excel file.

For example, suppose I have the files

importdata.mw
data.xlsx

in the same folder. If I copy that entire folder to another location, the copied Maple worksheet still refers to the original Excel file rather than the one located in the same folder as the worksheet. If the original folder is renamed or removed, re-executing the worksheet results in errors because Maple can no longer find the Excel file.

This makes it difficult to distribute teaching material to my students. Ideally, I would like to give them a ZIP file containing both files. After extracting the ZIP file, the worksheet should simply use the data.xlsx file located in the same folder. Instead, the students have to import the Excel file again manually, which is rather inconvenient.

My question is: Is there a way to make Maple use a relative path instead of an absolute path when importing Excel data?

I am happy to use a single line of Maple code if necessary, but I would prefer not to introduce several lines of code or programming constructs. We do not really teach Maple programming; our students mainly work with the graphical interface (tabs and ribbons).

I hope someone can help.

Erik

Please Wait...