1

I am wanting to export my .xlsx file to a network drive. I am currently doing this as below:

workbook = xlsxwriter.Workbook('z:/Company drive/Checking/Monthly Checks.xlsx')

I want my colleagues to be able to use this software and would be ideal if they did not have to remap the drive to Z:.

Is it possible to export to a path like "\servername\Checking\Monthly Checks.xlsx"?

1 Answers1

1

Yes it is possible to use a UNC path instead of a mapped drive.

I would recommend putting the r'...' string literal modifier in front (link to an answer with a detailed explanation).

So your code would be workbook = xlsxwriter.Workbook(r'\\servername\Company drive\Checking\Monthly Checks.xlsx') instead of workbook = xlsxwriter.Workbook('\\servername\Company drive\Checking\Monthly Checks.xlsx')

patrickjlong1
  • 3,683
  • 1
  • 18
  • 32