xlsxRead does not work if file is open in Excel

Hi ! I’m using the xlsxRead function introduced in the recent 2026.0.1 version, which simplify my work greatly, thank you developers !

However, it seems than it does not work if the file is open in Excel. I get the following output in the console : xlsxRead: XLNT library error.

I haven’t seen in the documentation that the file must not be open in Excel in order for the function to work properly

Does any of you confirm this behavior?

Hello,
I don’t reproduce your issue. Can you share your file ?
Adeline

Thank you for your answer @adeline.carnis.

It seems that the website does not support uploading Excel files. However, the problem arises even for very simple files, like one containing these data

category value
a 1
b 2
c 3

To open it, I used the following command (I forgot to mention the options I used in my first post):

data = xlsxRead("path_to_file/scilab_test_file.xlsx","sheet","data","conversion","string");

I actually just found that I can read a file currently open in excel if the file is not synced with Microsoft Sharepoint (stored somewhere else on my computer).

My previous attempt, on which there is a problem, was on a file that is synced using Microsoft SharePoint, so it seems that SharePoint prevents the file to be read if the file is opened. I add that the file is saved locally in this case.

So, this seems to be a result of Microsoft SharePoint behaviour.

1 Like