Calc: problem with indirect function

I use an indirect function

=INDIRECT(defaults.c7 & "44564")

where I reference C7 in sheet defaults. The C7 cell contains a column letter.

Directly after loading the document. I get a #NAME? error.

When I click on the cell with the #NAME? error and use
image to edit the function the result of 0 will be shown and when clicking just OK the error is gone, and the cell contains 0.

I have no idea what is wrong here.

Welcome! And what is the formula in cell C44564 on this sheet?

Thanks for your quick reaction.

It contains a '0`.

And there are no macros in the document? And this is a document of the .ods (not the .xlsx)? (I created a test table with two sheets, with the letter C in the defaults.C7 cell, with the formula = A44564 + B44564 in the C44564 cell, opened and closed it several times - I could not get the error you described)

It is an .xlsx document I have to admit

Actually I create that document with python using the xlsxwriter package.

Interestingly, when I load the created documetn with libreoffice and immediately save it as .ods then the INDIRECT is just working fine.

It is unlikely that the reason for the error is hidden here. Nevertheless, let’s clarify one more point - are the interface languages for Calc and Excel the same?

Not knowing for sure. At least I assumed that the same named functions in excel and libreoffice work the same. But it seems there are subtle differences.

Have you tested this formula in Excel? Or only in Calc? Perhaps Excel will give the same error? In this case, it makes sense to carefully look at the piece of code that writes the formula to the cell - a typo?

I didn’t find any sophistcated python package to create a .ods file. That’s why I used xlsxwriter.

Being on Linux I have to admit I don’t have a Windows and also no Excel. I have to ask a friend of mine who has both to load my document. :slight_smile:

I do not consider myself an expert in this area. Perhaps @Ratslinger or @karolus will join the discussion now and the problem will be resolved. But keep in mind, the first thing they ask for is the code.

Exactly that…?


:grinning_face_with_smiling_eyes: Of course not! Consider my bad English :nerd_face:

This package doesn’t have enough features.

Sorry, my fault, read: “That exactly is the question!”
Your English seems better than mine!

Currently, a kind of solution (aka. workaround) is to save the created .xlsx file to .ods and all is ok. :slight_smile:

@manfred.lotz, could you please upload a sample .xlsx file?

I will create a minimal example, and then upload it. Make take some time.

Just another programmer generating something he does not understand. Welcome to LibreOffice.