TransWikia.com

Excel2Latex automatic save points to web/sharepoint locationin MS365

TeX - LaTeX Asked on December 17, 2020

I am using https://github.com/krlmlr/Excel2LaTeX / https://www.ctan.org/pkg/excel2latex?lang=en which is going strong without update after 3 years.

With my office 365 version of excel, the Excel2Latex macro exits with the VBA error:

Run-time error '52'
Bad file name or number

When I click on debug, it open a MS VBA debug window at the memento module and highlights the line of Open sFilename .... in

If pModel.Encoding = Application.DefaultWebOptions.Encoding Then
        Open sFileName For Output Access Write Lock Read Write As #1
        Print #1, sCodePageRemark
        Print #1, pModel.GetConversionResult;
        Close #1

When I click on the browse button of the macro (when converting a selection) it opens the windows file location picker at:

https://xxx-my.sharepoint.com/personal/xxx/Documents/xxx/LaTeX/Tab

note that my excel file is stored in a MS365 Onedrive folder.

(I really enjoy the workflow of using input to add tables in my LaTeX report and when I adjust tables to just select, click and have them saved in the file that will be automagically included in my report.)

This leads to my questions:

  1. Is it possible to change the VBA line sFileName = pModel.AbsoluteFileName so that it captures the offline file location on my hdd instead of the online sharepoint/onedrive location? In that case I could try to make a new version of the current Excel2Latex package to make it up to date with MS365 🙂
  2. Is it possible to adjust other settings in Excel so that it will ouput the actual / offline file location instead of the web/sharepoint file location to the Excel2Latex macro?

Of course, one can always work around by copying the table the clipboard and manually pasting or clicking on browse and manually select the folder.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP