django import excel file from same directory 1

django import excel file from same directory

import os.path
fullpath = os.path.abspath('..\same-directory\2_file.xlsx')

Here is what the above code is Doing:
1. We import the os.path module.
2. We create a variable called fullpath and set it equal to the result of os.path.abspath(‘..\same-directory\2_file.xlsx’).
3. We pass the fullpath variable to the open() function.

Similar Posts